import math 
n=int(input())
if n<0:
    print("Invalid input"
else:
    print(math.factorial(n))