local a = io.read("*n") local t = {} local divnum = 2 while(1 < a) do if(a % divnum == 0) then if(t[divnum] == nil) then t[divnum] = 1 else t[divnum] = nil end a = a / divnum else divnum = divnum + (divnum == 2 and 1 or 2) end end local res = 1 for k, v in pairs(t) do res = res * k end print(res)