import math



N = int(eval(input()))



power = math.factorial(N)



print((power % 1000000007))



n=int(eval(input()))

ans=1

for i in range(n):

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

print(ans)
import math

N = int(eval(input()))
power = math.factorial(N)
print((power % 1000000007))

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

-import math - -N = int(eval(input())) -power = math.factorial(N) -print((power % 1000000007)) +n = int(eval(input())) +ans = 1 +for i in range(n): +    ans = (ans * (i + 1)) % (10**9 + 7) +print(ans)