from math import sqrt def getPrimeList(n): ps = [2, 3, 5, 7] primes = [i for i in ps if n >= i] for i in range(11, n + 1, 2): primeflag = True for j in primes: if j ** 2 > i: break if i % j == 0: primeflag = False break if primeflag: primes.append(i) return primes X = int(input()) res = 1 ps = getPrimeList(int(sqrt(X) + 1)) idx = 0 while X != 1: count = 0 while X % ps[idx] == 0: X //= ps[idx] count += 1 if count % 2 == 1: res *= ps[idx] idx += 1 print(res)