# ABC 055: B – Training Camp

from math import factorial



n = int(eval(input()))



print((factorial(n) % (10 ** 9 + 7)))
# ABC 055: B – Training Camp

from math import factorial



n = int(eval(input()))

power = 1



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

    power = (i * power) % (10 ** 9 + 7)



print(power)
# ABC 055: B – Training Camp
from math import factorial

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

# ABC 055: B – Training Camp
from math import factorial

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

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