from math import factorial

N = int(eval(input()))

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

N = int(eval(input()))

ans = 1

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

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

    ans %= 10**9 + 7

print(ans)
from math import factorial

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

from math import factorial

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

-print((factorial(N) % (10**9 + 7))) +ans = 1 +for i in range(1, N + 1): +    ans *= i % (10**9 + 7) +    ans %= 10**9 + 7 +print(ans)