n=int(input()) ans=1 p=2 while p <= n**0.5: m=0 while n%p ==0: m += 1 n = n//p if m%2==1: ans *= p p += 1 ans *= n print(ans)