import math

N=int(eval(input()))

ans=math.factorial(N)

print((ans%(10**9 +7)))
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

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

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 -ans = math.factorial(N) -print((ans % (10**9 + 7))) +ans = 1 +for i in range(1, N + 1): +    ans *= i +    ans %= mod +print(ans)