n=int(input()) out=1 for i in range(2,1+int(n**0.5)): if n%i==0: co=0 while n%i==0: co+=1 n//=i; if co%2:out*=i if n-1:out*=n print(out)