from math import factorial j = int(input()) if j==0: print("0") else: print(factorial(j))