X = int(input()) res = 1 i = 2 while X != 1: cnt = 0 while X % i == 0: X //= i cnt += 1 if cnt % 2 == 1: res *= i i += 1 print(res)