x = int(input()) n = 2 m = 0 Y = 1 while x != 1: if x%n == 0: m += 1 x = x/n else: if m %2 !=0: Y *= n n +=1 m = 0 if m % 2 != 0: Y *= n print(Y)