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