from collections import defaultdict n=int(input()) def prime_list(x): i=2 prime=defaultdict(int) while i*i<=x: while x%i==0: x//=i prime[i]+=1 i+=1 if x>1: prime[x]+=1 return prime p=prime_list(n) ans=1 for x in p: if p[x]%2==1: ans*=x print(ans)