-- Try yukicoder -- author: Leonardone @ NEETSDKASU main = putStrLn . solve . read =<< getLine solve x | x > 49 = replicate 12 '0' -- 因数に2と5が両方12個以上あると下12桁はずっと0 | otherwise = show $ kaijo 1 x where kaijo a 0 = a kaijo a k = kaijo (a * k `mod` 10 ^ 12) (k - 1)