local n = io.read("*n") if(60 <= n) then print("000000000000") else local m = 1 for i = 2, n do m = (m * i) % 1000000000000 end if(15 <= n) then local dig = 0 local tm = m while(0 < tm) do tm = math.floor(tm / 10) dig = dig + 1 end if(m == 0) then dig = 1 end for i = dig + 1, 12 do io.write("0") end io.write(m .. "\n") else print(m) end end