Given the number *n*, find the smallest positive integer which has exactly *n* divisors. It is guaranteed that for the given *n* the answer will not exceed 10<sup class="upper-index">18</sup>.
The first line of the input contains integer *n* (1 ≤ *n* ≤ 1000).
lis=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
ans=1e18

def solve(n,i,l=1):
    global ans
    if n==1:
        return l
    if i==10:
        return 1e18
    for j in range(2,10):
        if n%j==0:
            a=solve(n//j,i+1,l*lis[i]**(j-1))
            if a!=None:
                ans=min(a,ans)
(solve(int(input()),0))
print(ans)
