N = int(eval(input()))

a = 1

for n in range(2,N+1):

    a = a*n % (10**9+7)

print(a)
import math

N = int(eval(input()))

a = 1

for n in range(2,N+1):

    a = a*n % (10**9+7)

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

import math

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

+import math +