import math

N=int(eval(input()))

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

power=1

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

    power*=i

    power%=10**9+7

print(power)
import math

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

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

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