from functools import reduce from collections import Counter N = int(input()) def factors(x): f = [1] while x % 2 == 0: f.append(2) x = x // 2 n=3 while x >= n * n: while x % n == 0: f.append(n) x = x // n n = n + 2 if x == 1: return f f.append(x) return f cnt = Counter(factors(N)) ans = reduce(lambda x, y: x * y, [i for i, v in cnt.items() if v%2 != 0]) print(ans)