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).
ans = 2e18
now = []
p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]

def dfs(x):
    global ans
    if x == 1:
        res = 1
        for i in range(len(now)):
            res *= pow(p[i], now[i] - 1)
            if res > 1e18:
                return
        ans = min(ans, res)
    for i in range(x, 1, -1):
        if x % i == 0:
            now.append(i)
            dfs(x // i)
            now.pop()

n = int(input())
dfs(n)
print(ans)