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