x = int(input()) if x == 1: print(1) else: d = {} s = 0 while s == 0: for i in range(2, x+1): if x % i == 0: x = x// i if not i in d: d[i] = 1 else: d[i] += 1 if x == 1: s = 1 break keys = [k for k, v in d.items() if v % 2 != 0] ans = 1 for i in keys: ans *= i print(ans)