import System.Environment fact :: Int -> Int fact n = fact' n 0 fact' 0 m = m fact' n m = fact' (n - 1) (m + n) main = do x <- getArgs print . fact . read $ head x