import math

x = int(eval(input()))

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

fact = 1

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

  fact = fact * i % (10**9 +7)

res = fact % (10**9 + 7)

print(res)
import math

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

n = int(eval(input()))
fact = 1
for i in range(1, n + 1):
    fact = fact * i % (10**9 + 7)
res = fact % (10**9 + 7)
print(res)

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