import System
import Prelude

fact :: Integer -> Integer
fact 0 = 1
fact n = n * fact (n - 1)

strToInt :: String -> Integer
strToInt str = (read :: String -> Integer) str

main = do args <- getArgs
          print $ fact $ strToInt $ head args