print((function (n) local h,i,t,r = {},2,n,1 while i^2<=n do if t%i==0 then if h[i]==nil then h[i]=0 end h[i],t=h[i]+1,t/i else i=i+1 end end if t~=1 then if h[t]==nil then h[t]=0 end h[t]=h[t]+1 end for k,v in pairs(h) do if v%2~=0 then r=r*k end end return r end)(io.stdin:read("*n")))