import math

N = int(eval(input()))

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

N = int(eval(input()))

a = 1

for n in range(2,N+1):

    a = a*n % (10**9+7)

print(a)
import math

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

import math

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

-print((math.factorial(N) % (10**9 + 7))) +a = 1 +for n in range(2, N + 1): +    a = a * n % (10**9 + 7) +print(a)