x=gets.to_i y=1 i=2 while i*i<=x t=0 while x%i==0 x/=i;t^=1 end y*=i if t==1 i+=1 end puts y*x