N=int(eval(input()))

power=1

for i in range(N):

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

print(power)
def n_func(n,mod=10**9+7):

    ans=1

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

        ans=(ans*i)%mod

    return ans

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

def n_func(n, mod=10**9 + 7):
    ans = 1
    for i in range(1, n + 1):
        ans = (ans * i) % mod
    return ans


print((n_func(int(eval(input())))))

-N = int(eval(input())) -power = 1 -for i in range(N): -    power = (power * (i + 1)) % (10**9 + 7) -print(power) +def n_func(n, mod=10**9 + 7): +    ans = 1 +    for i in range(1, n + 1): +        ans = (ans * i) % mod +    return ans + + +print((n_func(int(eval(input())))))