# -*- coding: utf-8 -*- def f(X,Y,i): n=0 q,r=divmod(X,i) while r==0: n+=1 X=q q,r=divmod(X,i) if n%2==0: return (X,Y) else: return (X,Y*i) X,Y=f(int(input()), 1, 2) X,Y=f(X, Y, 3) i=5 while i**2<=X: if i%3!=0: X,Y=f(X,Y,i) i+=2 print(Y*X)