# -*- coding: utf-8 -*- """ No.300 平方数 https://yukicoder.me/problems/no/300 """ import sys from sys import stdin from collections import Counter input = stdin.readline def calc_divisors(N): divisors = [] for i in range(2, int(N**0.5)+1): while N % i == 0: divisors.append(i) N //= i return divisors def solve(X): divisors = calc_divisors(X) ans = 1 for v, fre in Counter(divisors).most_common(): if fre % 2 == 1: ans *= v return ans def main(args): X = int(input()) ans = solve(X) print(ans) if __name__ == '__main__': main(sys.argv[1:])