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).
# LUOGU_RID: 95811399
def is_prime(x):
    if x==1:return False
    if x==2 or x==3:return True
    if x%6!=1 and x%6!=5:return False
    for i in range(5,x**0.5+1,6):
        if x%i==0 or x%(i+2)==0:
            return False
    return True
def pfc(x):
    st=[]
    i=0
    if x==1:
        st.append(1)
        return st
    while i<x:
        if is_prime(x):
            st.append(x)
            return st
        i=2
        while i<n:
            if x%i==0:
                st.append(i)
                x//=i
                break
            i+=1
    st.append(x)
    return st
n=int(input())
fx=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263]
l=pfc(n)
ans=1
for i in range(len(l)):
    ans*=(l[len(l)-i-1]-1)*fx[i]
print(ans)
