from __future__ import print_function
import math
import sys
try:
    reduce = reduce
except NameError:
    from functools import reduce


compose = lambda *funcs: lambda x: reduce(lambda y, f: f(y), reversed(funcs), x)

compose(print, math.factorial, int)(sys.stdin.read())