from functools import reduce as R

print((R(lambda x, y: x*y, list(range(1, int(eval(input()))+1)))))
import math

print((math.factorial(int(eval(input())))))

from functools import reduce as R

print((R(lambda x, y: x * y, list(range(1, int(eval(input())) + 1)))))

import math

print((math.factorial(int(eval(input())))))

-from functools import reduce as R +import math -print((R(lambda x, y: x * y, list(range(1, int(eval(input())) + 1))))) +print((math.factorial(int(eval(input())))))