A=int(input()) ans=10**18 for p in range(2,100): cur=1 while pow(p,cur)