# from math import factorial
n = int(input())
def factorial(n):
    fact = 1
    if n <= 2:
        return n
    else:
        for i in range(1,n+1):
            fact *= i
    return fact
print(factorial(n))