import math

x = int(eval(input()))

print((math.factorial(x) % (10**9 + 7)))
M = 1000000007

n=int(eval(input()))

f = 1

for i in range(1, n + 1):  

    f = (f * i) % M 

print(f)
import math

x = int(eval(input()))
print((math.factorial(x) % (10**9 + 7)))

M = 1000000007
n = int(eval(input()))
f = 1
for i in range(1, n + 1):
    f = (f * i) % M
print(f)

-import math - -x = int(eval(input())) -print((math.factorial(x) % (10**9 + 7))) +M = 1000000007 +n = int(eval(input())) +f = 1 +for i in range(1, n + 1): +    f = (f * i) % M +print(f)