#!/bin/python3

import sys

def factorial(n):
    # Complete this function
    if n < 2:
        return 1
    else:
        temp = factorial(n-1)
        fact = n * temp
        return fact

if __name__ == "__main__":
    n = int(input().strip())
    result = factorial(n)
    print(result)
