import math



n = int(eval(input()))

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

p = 1

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

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

print(p)
import math

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

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

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