# -*- coding: utf-8 -*- X=int(input()) Y=1 i=2 while i**2<=X: n=0 while X%i==0: n+=1 X//=i if n%2!=0: Y*=i i+=1 Y*=X print(Y)