from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline X = int(input()) Y = [] ans = 1 now = 2 while X!=1: if now>10**6: break while X%now==0: Y.append(now) X //= now now += 1 C = Counter(Y) Y.append(X) for k,v in C.items(): if v%2==0: continue ans *= k print(ans)