#coding: utf-8 ##yuki_300 def prime_decomp(n): i = 2 t=[] while i * i <= n: while n % i == 0: n /= i t.append(i) i += 1 if n > 1: t.append(n) return t x=int(raw_input()) res=1 s=prime_decomp(x) for i in xrange(len(s)): if s.count(s[i]) % 2==0: continue else: res*=s[i] s[i]=0 print res