import numpy as np X =int(input()) M =int(np.sqrt(X)) for i in range(-M,-1): if X %(i**2) == 0: print(X//(i**2)) break