def prime_factors(N): res = {} for i in range(2, int(N ** 0.5) + 1): while N % i == 0: res.setdefault(i, 0) res[i] += 1 N //= i if N != 1: res[N] = 1 return res X = int(input()) pf = prime_factors(X) Y = 1 for p, e in pf.items(): Y *= pow(p, (e + 1) // 2 * 2 - e) print(Y)