import collections def is_prime(n): ans = [1] while n % 2 == 0: ans.append(2) n //=2 f = 3 while f * f <= n: if n % f == 0: ans.append(f) n //= f else: f += 2 if n != 1: ans.append(n) return ans x = int(input()) c = collections.Counter(is_prime(x)) C = sorted(c.items(), key=lambda x:x[0]) ans = 1 for k, v in C: if v % 2 == 1: ans *= k print(ans)