from math import factorial

mod = 10 ** 9 + 7

n = int(eval(input()))



ans = factorial(n)

print((ans % mod))



mod = int(1e9+7)

n = int(eval(input()))



power = 1

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

    power = power * i % mod

print(power)
from math import factorial

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

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

-from math import factorial - -mod = 10**9 + 7 +mod = int(1e9 + 7) -ans = factorial(n) -print((ans % mod)) +power = 1 +for i in range(1, n + 1): +    power = power * i % mod +print(power)