from collections import defaultdict x = int(input()) d = defaultdict(int) while x % 2 == 0: x //= 2 d[2] += 1 f = 3 while f * f <= x: while x % f == 0: x //= f d[f] += 1 f += 2 if x != 1: d[x] += 1 ans = 1 for val, cnt in d.items(): if cnt % 2 == 1: ans *= val print(ans)