import math

n = int(eval(input()))

print((math.factorial(n)%(10**9+7)))

n = int(eval(input()))

pw = 1

for i in range(n):

  pw *= (i+1)

  pw %= 10**9+7

print(pw)
import math

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

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

-import math - -print((math.factorial(n) % (10**9 + 7))) +pw = 1 +for i in range(n): +    pw *= i + 1 +    pw %= 10**9 + 7 +print(pw)