import math



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



mod_n = 10**9+7

ans = 1



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

  ans = ans*i%mod_n

  

print(ans)

import math

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

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

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