N = int(input()) d = 2 L = [] while N > d: if N % d == 0: L.append(d) N = N / d else: d += 1 L.append(int(N)) 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)