import math

mod = 10 ** 9 + 7

n = int(eval(input()))

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

n = int(eval(input()))

ans = 1

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

    ans *= i

    ans %= mod

print(ans)
import math

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

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

-import math - -print((math.factorial(n) % mod)) +ans = 1 +for i in range(1, n + 1): +    ans *= i +    ans %= mod +print(ans)