n=int(eval(input()))

import math 

print((math.factorial(n)%((10**9)+7)))
def training(n):

    if n==1:

        return 1

    else:

        x=training(n-1)*n

        return x%mod

import sys

n=int(eval(input()))

sys.setrecursionlimit(10**9)

mod=10**9+7

print((training(n)))
n = int(eval(input()))
import math

print((math.factorial(n) % ((10**9) + 7)))

def training(n):
    if n == 1:
        return 1
    else:
        x = training(n - 1) * n
        return x % mod


import sys

n = int(eval(input()))
sys.setrecursionlimit(10**9)
mod = 10**9 + 7
print((training(n)))

+def training(n): +    if n == 1: +        return 1 +    else: +        x = training(n - 1) * n +        return x % mod + + +import sys + -import math - -print((math.factorial(n) % ((10**9) + 7))) +sys.setrecursionlimit(10**9) +mod = 10**9 + 7 +print((training(n)))