N = int(input()) X = N d = 2 L = [] while N >= d*d: if N % d == 0: L.append(d) N = N / d else: d += 1 L.append(int(N)) if N == X: print(X) exit() D = {} for x in L: if not x in D: D[x] = 1 else: D[x] += 1 Y = 1 for x in D: if D[x] %2 != 0: Y *= x print(Y)