Y = int(input()) i = 2 while i ** 2 <= Y: if Y % (i ** 2) < 1: Y //= i ** 2 else: i += 1 print(Y)