#错
n=input()
def f(n):
m=1
for i in range(1,n+1):
m *= i
return m
print(f(n))
#对,注意第二行的区别
n=eval(input())
def f(n):
m=1
for i in range(1,n+1):
m *= i
return m
print(f(n))
#错
n=input()
def f(n):
m=1
for i in range(1,n+1):
m *= i
return m
print(f(n))
#对,注意第二行的区别
n=eval(input())
def f(n):
m=1
for i in range(1,n+1):
m *= i
return m
print(f(n))