main = readLn >>= putStrLn . fcalc fcalc n | n >= 50 = "000000000000" | otherwise = reverse $ take 12 $ reverse $ show $ product [1..n]