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).
primes=[2,3,5,7,11,13,17,19,23,29,31,37,41]
MAX=10**100
def f(num,factors,i,n):
    global primes,MAX
    if(factors==n):
        return num
    if(i==len(primes)):
       return MAX
    ret=MAX
    for power in range(63):
        if(factors*(power+1)>n or num>ret or num>=MAXV):
            break
        ret=min(ret,f(num*(primes[i]**power),factors*(power+1),i+1,n))
    return ret
n=int(input())
print(f(1,1,0,n))





