Problem:
 Score : 200 points    Problem Statement Snuke loves working out. He is now exercising N times.  Before he starts exercising, his power is 1 . After he exercises for the i -th time, his power gets multiplied by i .  Find Snuke's power after he exercises N times. Since the answer can be extremely large, print the answer modulo 10^{9}+7 .      Constraints  1 ≤ N ≤ 10^{5}         Input The input is given from Standard Input in the following format:  N       Output Print the answer modulo 10^{9}+7 .        Sample Input 1 3      Sample Output 1 6   After Snuke exercises for the first time, his power gets multiplied by 1 and becomes 1 .  After Snuke exercises for the second time, his power gets multiplied by 2 and becomes 2 .  After Snuke exercises for the third time, his power gets multiplied by 3 and becomes 6 .        Sample Input 2 10      Sample Output 2 3628800       Sample Input 3 100000      Sample Output 3 457992974  Print the answer modulo 10^{9}+7 .

Solution (Python):
import math

N = int(input())

print(math.factorial(N) % 1000000007)

Solution (Python):
n=int(input())

ans=1

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

print(ans)

Solution (Python):
N=int(input())
p=1
for i in range(2,N+1):
	p=(p*i)%1000000007
print(p)

Solution (Python):
N = int(input())
ans = 1
for i in range(N):
    ans = ans * (i+1) % (10 ** 9 + 7)
print(ans)

Solution (Python):
import math
n = int(input())

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

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%((10**9)+7))

Solution (Python):
n = int(input())

power = 1
for i in range(n):
    power = power * (i+1)%1000000007
    power %= 1000000007

print(power)

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

Solution (Python):
import math
N=int(input())
print(math.factorial(N)%(10**9+7))

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N+1):
  a = i % (10 ** 9 + 7)
  ans *= a
  ans = ans % (10 ** 9 + 7)
print(ans)

Solution (Python):
import math
N = int(input())
print(math.factorial(N) % (10**9 + 7))

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

Solution (Python):
import math
N = int(input())
print(math.factorial(N) % (10 ** 9 + 7))

Solution (Python):
n = int(input())

result_mod = 1

for i in range(n):
	result_mod = result_mod *  (i + 1)
	result_mod = result_mod % ( 10**9 + 7 )

print(result_mod)

Solution (Python):
import math
N=int(input())
print(math.factorial(N)%(10**9+7))

Solution (Python):
n = int(input())

rem = 1
for i in range(n):
  rem = rem * (i + 1) % (1e9 + 7)
print(int(rem))

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
A = 1
for i in range(1, N + 1):
    A = (A * i) % (10 ** 9 + 7)
print(A)

Solution (Python):
N = int(input())
Q = 1000000007

ans = 1
for i in range(1, N+1):
    ans *= i
    ans %= Q

print(ans)

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
import math

n = int(input())

m = 10 ** 9 + 7

print(math.factorial(n) % m)

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

Solution (Python):
def training_camp(N: int) -> int:
    MOD = 10 ** 9 + 7
    ret = 1
    for n in range(N):
        ret = (ret * (n + 1)) % MOD
    return ret


if __name__ == "__main__":
    N = int(input())
    ans = training_camp(N)
    print(ans)

Solution (Python):
n, = map(int, input().split())
mod = 10**9 + 7

ans = 1
for i in range(1, n+1):
    ans = ans * i % mod
print(ans)

Solution (Python):
n=int(input())
mod=10**9+7

ans=1
for i in range(1,n+1):
  ans=ans*i%mod
print(ans)

Solution (Python):
import math

N = int(input())

power = 1
NUM = 10 ** 9 + 7

for i in range(1, N + 1) :
    power *= i 
    if power >= NUM :
        power %= NUM
print(power)
"""
power = math.factorial(N)

print(power % (10 ** 9 + 7))
"""

Solution (Python):
import math

N = int(input())

power = math.factorial(N)

print(power % (10 ** 9 + 7))

Solution (Python):
def INSTR():
	return input()

def INNUM():
	return int(INSTR())

def INSTR_S():
	return INSTR().split()

def INNUM_S():
	return map(int, INSTR_S())

def INSTR_M(n):
	return [INSTR() for _ in range(n)]

def INNUM_SM(n):
	return [tuple(INNUM_S()) for _ in range(n)]

import math
N = INNUM()
print(math.factorial(N) % (10**9 + 7))

Solution (Python):
n=int(input())
hoge=1
for i in range(n):
  hoge=(hoge*(i+1))%1000000007
  
print(hoge)

Solution (Python):


import math

n = int(input())

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

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

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
N=int(input())
res=1
for i in range(1,N+1):
    res*=i
    res%=(10**9+7)
print(res)

Solution (Python):
ans=1
a=[i for i in range(1,int(input())+1)]
for i in a:
  ans*=i
  ans%=10**9+7
print(ans)

Solution (Python):
power = 1

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

Solution (Python):
from math import factorial
print(factorial(int(input()))%1000000007)

Solution (Python):
N=int(input())
power=1

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

Solution (Python):
N = int(input())
p = 1
d = 10**9 + 7
for i in range(1, N+1):
    p = (p * i) % d
print(p)

Solution (Python):

N = int(input())
ans = 1

for i in range(1, N + 1):
    ans *= i
    ans %= (10 ** 9 + 7)
print(ans)

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

Solution (Python):
N = int(input())
MOD = 10**9 +7
ans = 1
for i in range(1,N+1):
    ans = (ans*i)%MOD
print(ans)

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    ans *= i
    ans %= 10**9 + 7
print(ans)

Solution (Python):
ans=1
for _ in range(int(input())):
    ans*=_+1
    ans%=int(1e9+7)
print(ans)

Solution (Python):
import math

N = int(input())
ans = math.factorial(N)
print(ans % (10**9 + 7))

Solution (Python):
N = int(input())

ans = 1
for i in range(1,N+1):
    ans *= i
    ans %= (10 ** 9 + 7)
print(ans)

Solution (Python):
N = int(input())
Mod = 10**9 + 7
ans = 1  

for i in range(1, N + 1):
    ans = (ans * i) % Mod  
    
print(ans)

Solution (Python):
N = int(input())

ans = 1  

for i in range(1, N + 1):
    ans = ans * i % (10**9 + 7)  
print(ans)

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
	ans = (ans * i) % (10**9+7)
print(ans)

Solution (Python):
N = int(input())
MOD = 10 ** 9 + 7
ans = 1
for i in range(1, N):
    ans = (ans * (i + 1)) % MOD
print(ans)

Solution (Python):
N = int(input())
ans = 1

for i in range(1,N+1):
  ans = (ans * (i))%(10**9+7)
print(ans)

Solution (Python):
N = int(input())
modd = 10**9+7
ans = 1

for i in range(1,N+1):
    ans *= i
    ans %= modd
    
print(ans)

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

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

Solution (Python):
N = int(input())

power_level = 1

for i in range(N):
    power_level *= (i + 1)
    power_level %= (10**9 + 7)


print(power_level)

Solution (Python):
N = int(input())

power = 1
mod = 10 ** 9 + 7

for i in range(1, N + 1):
    power = (i * power) % mod
print(power)

Solution (Python):
N = int(input())

power = 1
mod = 10 ** 9 + 7

for i in range(1, N + 1):
    power *= i
    power %= mod
print(power)

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

Solution (Python):
import math

n = int(input())

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

Solution (Python):
n = 10**9+7
N = int(input())
ans = 1
for i in range(2, N+1):
    ans = (ans*i) % n
print(ans)

Solution (Python):
N = int(input())
p = 1
for i in range(1, N+1):
    p = (p*i) % (10**9 + 7)
print (p)

Solution (Python):
N =int(input())

w = (10**9)+ 7
ans =1
for i in range(1,N+1):
    ans *= i
    if ans >=w:
        ans%=w
print(ans)

Solution (Python):
N = int(input())

ans = 1
for i in range(1,N+1):
  ans *= i
  ans %= 10**9+7
print(ans)

Solution (Python):

N = int(input())
ans =1
w = pow(10,9) + 7
for i in range(1,N+1):
    ans *= i
    if ans >=w:
        ans %=w
print(ans)

Solution (Python):

N=int(input())
ans = 1
w = (10**9) +7
for i in range(1,N+1):
    ans *=i
    if ans >=w:
        ans %= w
print(ans)

Solution (Python):
n = int(input())
ans = 1
w = pow(10,9) + 7

for i in range(1,n+1 ):
    ans *= i
    if ans >= w:
        ans %= w
print(ans)

Solution (Python):
import math
N=int(input())
P=(math.factorial(N))%(10**9+7)
print(P)

Solution (Python):
N = int(input())
P = 1
for i in range(N):
    P = (P * (i+1)) % 1000000007
print(P)

Solution (Python):
import math

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

Solution (Python):
import math;print(math.factorial(int(input()))%1000000007)

Solution (Python):
n = int(input())

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

print(power%(7+10**9))

Solution (Python):
n = int(input())

power = 1

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

Solution (Python):
N=int(input())
p=1
for i in range(1,N+1):
    p=p*i
    p=p%(10**9+7)
print(p)

Solution (Python):
MOD = 10 ** 9 + 7

N = int(input())
power = 1
for i in range(1, N+1):
    power *= i
    power = power % MOD

print(power)

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

Solution (Python):
MOD = 10**9+7


def main():
    N = int(input())
    ans = 1
    for i in range(1, N+1):
        ans = (ans*i) % MOD
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
import math
m=math.factorial(n)
print(m%(10**9+7))

Solution (Python):
N = int(input())
M = 10**9 + 7
ans = 1
for i in range(1, N+1):
    ans *= i
    ans %= M

print(ans)

Solution (Python):



def main():
    n = int(input())

    p = 1

    for i in range(1, n+1):
        p *= i
        p = p%(10**9+7)

    print(p)


if __name__ == '__main__':
    main()

Solution (Python):



def main():
    n = int(input())

    p = 1

    for i in range(1, n+1):
        p *= i
        if p >= 10**9+7:
            p = p%(10**9+7)

    print(p)


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
g = 1
for i in range(1,N+1):
    g *= i
    if g >= 1000000007:
        g %= 1000000007
print(g)

Solution (Python):
import math
a=math.factorial(int(input()))
print(a%(10**9+7))

Solution (Python):
n = int(input())
res = 1
for i in range(1,n+1):
    res *= i
    if res>=10**9+7:
        res = res%(10**9+7)
print(res)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007


def A():
    n = II()
    ans = n * 800
    print(ans-(n//15)*200)
    return


def B():
    n = II()
    print(math.factorial(n)%mod)
    return


def C():

    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    B()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


def A():
    n = I()
    print(n*800-200*(n//15))


def B():
    k = I()
    ans = 0
    for i in range(1,k):
        for j in range(i+1,k+1):
            if (i%2)^(j%2):
                ans += 1
    print(ans)


def C():
    x,t = LI()
    print(max(0,x-t))


def D():
    n = I()
    ans = 1
    for i in range(1,n+1):
        ans *= i
        ans %= mod
    print(ans)


def E():
    return


def F():
    return


def G():
    return


def H():
    return

def J():
    return

def K():
    return


if __name__ == "__main__":
    D()

Solution (Python):
n = int(input())

res = 1
big = 10**9 + 7
for i in range(n):
    res *= (i+1)
    res %= big
    
print(res)

Solution (Python):
N = int(input())
power = 1

for i in range(1, N+1):
    power *= i
    power = power % (10**9 + 7)

print(power)

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

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N+1,1):
    ans = (ans*i)%(10**9+7)
print(ans)

Solution (Python):
N = int(input())
p = 1
mod = 10**9 + 7
for n in range(1,N+1):
    p = p*n
    p = p%mod
print(p)

Solution (Python):
N = int(input())
ret = 1
for i in range(1, N+1):
    ret*=i
    ret = ret%(10**9+7)
print(ret)

Solution (Python):
N = int(input())

mod = 10 ** 9 + 7

power = 1
for i in range(1, N + 1):
    power *= i % mod
    power %= mod

print(power)

Solution (Python):
N = int(input())
result = 1

for i in range(1, N+1):
    result *= i
    result %= 10**9+7

print(result)

Solution (Python):
N = int(input())

ans = 1
MOD = 10**9 + 7
for i in range(N):
    ans *= (i + 1)
    ans %= MOD

print(ans)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
rem = 1

for i in range(1, N+1):
    rem = (rem * i) % (1e9+7)

print(int(rem))

Solution (Python):
n = int(input())
power = 1
for i in range(1, n+1):
    power = (i * power) % 1000000007
print(power)

Solution (Python):
ans=1
for i in range(int(input())):
    ans=ans*(i+1)%(10**9+7)
print(ans)

Solution (Python):
import math
print(math.factorial(int(input()))%((10**9)+7))

Solution (Python):
n = int(input())

mod = 10 ** 9 + 7

ans = 1
for i in range(1, n + 1):
    ans = (ans * i) % mod

print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline



class FactMod():
    '''
    modの値が素数の時のfactと組み合わせを求める
    フェルマーの小定理を用いているため、modが素数以外の時は使えない
    '''

    def __init__(self, n, mod):
        '''
        コンストラクタ
        f:nまでの i!の値を　配列に入れる
        inv: (i!)^-1　の値を配列に入れる
        '''
        self.mod = mod
        self.f = [1]*(n+1)
        for i in range(1, n+1):
            self.f[i] = self.f[i-1]*i % mod

        self.inv = [pow(self.f[-1], mod-2, mod)]
        for i in range(1, n+1)[::-1]:
            self.inv.append(self.inv[-1]*i % mod)
        self.inv.reverse()

    def fact(self, n):
        '''
        n!の値を返す
        '''
        return self.f[n]

    def comb(self, n, r):
        '''
        nCrの値を返す
        '''
        ret = self.f[n] * self.inv[n-r]*self.inv[r] % self.mod
        return ret


N = int(input())
F = FactMod(N+1, 10**9+7)
print(F.fact(N))

Solution (Python):
ANS=1
for i in range(1,int(input())+1):
    ANS=ANS*i%(10**9+7)
print(ANS)

Solution (Python):
from math import factorial
N = int(input())
print(factorial(N)%(10**9+7))

Solution (Python):
import math 
n = int(input())
print(math.factorial(n)%1000000007)

Solution (Python):
def main():
    N = int(input())
    ans = 1
    for i in range(N):
        ans = (ans * (i+1)) % (10**9+7)
    print(ans)
    
main()

Solution (Python):
a=1
for i in range(1,int(input())+1):
    a=(i*a)%(10**9+7)
print(a)

Solution (Python):
import math
N=int(input())
print(math.factorial(N)%(10**9+7))

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N+1):
    ans *= i
    ans %= (1000000000+7)
print(ans)

Solution (Python):

"""
Created on Fri Mar  8 01:35:11 2019

@author: yuta
"""
import math

N = int(input())

def main(n):
    x = math.factorial(n)
    max_value = pow(10,9) + 7
    print(x % max_value)

main(N)

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    ans *= i
    if ans >= (10**9 + 7):
        ans %= (10**9+7)
print(ans)

Solution (Python):

import sys

def main():
	n = int(input())
	
	p = 1
	for i in range(1, n+1):
		p = (p * i) % 1000000007
		
	print(p)
	
if __name__ == "__main__":
	main()

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
import sys
sys.setrecursionlimit(100000)

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

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
res = 1
for i in range(1,n+1):
    res *= i
    res %= (10**9+7)
else:
    print(res)

Solution (Python):

INF=1e18
MOD=1e9+7

N=int(input())

ans=1

for i in range(1, N+1):
    ans*=i
    ans%=MOD

print(int(ans))

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N+1):
    ans *= i
    ans %= 10**9+7
print(ans)

Solution (Python):
N=int(input())
P=1
for i in range(N):
    P*=i+1
    if P>=1000000007:
        P%=1000000007
print(P)

Solution (Python):
import math

n = int(input())

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

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
import math
N=int(input())
print(math.factorial(N)%(7+10**9))

Solution (Python):
p = 1
for i in range(1,int(input())+1):
    p *= i
    p %= 10**9+7
print(p)

Solution (Python):
import math;print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy

def j(q):
    if q==1: print("YES")
    else:print("NO")
    exit(0)


def ct(x,y):
    if (x>y):print("GREATER")
    elif (x<y): print("LESS")
    else: print("EQUAL")

def ip():
    return int(input())


n = ip()                              











s = 1
for i in range(1,n+1):
    s*=i
    s%=(pow(10,9)+7)
print(s)

Solution (Python):
N = int(input())
power = 1
hou = pow(10, 9)+7
for i in range(1, N+1):
    power = (power * i) % hou
print(power)

Solution (Python):
N = int(input())
x = 1
for i in range(N):
  x = (x*(i+1))%(pow(10,9)+7)
print(x)

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

Solution (Python):
n = int(input())
ans = 1
mod =1000000007
for i in range(n):
  ans = ans*(i+1)
  ans = ans %mod
print(ans)

Solution (Python):
n = int(input())
mod = 1e9 + 7
ans = 1
for i in range(1, n+1):
    ans = (ans * i) % mod
print(int(ans))

Solution (Python):

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

Solution (Python):
N = int(input())
i = 1
for n in range(N):
    i = i*(n+1)%(10**9+7)
print(i)

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10**9 + 7))

Solution (Python):
import math
n=int(input())
ans=math.factorial(n)%1000000007
print(ans)

Solution (Python):
import math
print(math.factorial(int(input()))%(7+10**9))

Solution (Python):
""" AtCoder """

N = int(input())

t = 1000000000 + 7

ans = 1

for i in range(1, N + 1):
    ans *= i
    ans %= t

print(ans)

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

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

Solution (Python):
i=int(input())
ans=1
for n in range(i):
  ans*=(n+1)
  ans=ans % 1000000007

print(ans)

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

Solution (Python):
N = int(input())
p = 1
t = int(1e9)+7
for i in range(1,N+1):
  p *= i
  p %= t
print(p%t)

Solution (Python):
N = input()
p = 1
for i in range(N):
  p = p*(i+1)%1000000007
print p

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    ans *= i
    ans %= 1e9+7
print(int(ans))

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

Solution (Python):
def fun():
     print('ac')
     print('ac')
     print('ac')
     print('ac')
from math import*
n=eval(input())
n=factorial(n)%(10**9+7)
print(n)

Solution (Python):
n = int(input())
p = 1
for i in range(1, n+1):
  p = p*i % 1000000007
print(p)

Solution (Python):
N=int(input())
p=1
for i in range(N):
  p=p*(i+1)%1000000007
print(p)

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

Solution (Python):
n = int(input())
t = 1
a = 10**9 + 7
for i in range(1,n+1):
    t *= i
    t %= a
print(t)

Solution (Python):
INF = 1000000007


def modmulti(a, b):
    
    return a * b % INF


N = int(input())

ans = 1

for i in range(1, N + 1):
    ans = modmulti(ans, i)

print(ans)

Solution (Python):
INF = 1000000007


def modmulti(a, b):
    
    res = 0
    mod = a % INF
    while b > 0:
        if b & 1 == 1:
            res += mod
            if res > INF:
                res -= INF
        mod <<= 1
        if mod > INF:
            mod -= INF
        b >>= 1
    return res


N = int(input())

ans = 1

for i in range(1, N + 1):
    ans = modmulti(ans, i)

print(ans)

Solution (Python):
import math
n = int(input())
j=math.factorial(n)
print(j if j <= 10**5 else j%((10**9)+7))

Solution (Python):
N = int(input())

mod = 10 ** 9 + 7
ans = 1

for i in range(1, N + 1):
  ans *= i
  ans %= mod

print(ans)

Solution (Python):
import math
N = int(input())

result = math.factorial(N)

print(result%(10**9+7))

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

Solution (Python):
n = int(input())
d = 10**9 + 7

pow = 1
for i in range(1, n+1):
  pow *= i
  pow %= d
print(pow)

Solution (Python):
from math import factorial;print(factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
power = 1
for i in range(1, N + 1):
    power = (i*power)%(10**9+7)

print(power)

Solution (Python):
import math
print((math.factorial(int(input())))%(10**9 + 7))

Solution (Python):
MOD = 10**9+7


n = int(input())
ans = 1

for i in range(2,n+1):
    ans = ans*i%MOD
print(ans)

Solution (Python):
import math

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

Solution (Python):
n = int(input())
t = 1
for i in range(1, n+1):
    t *= i
    if t > 1000000007:
        t %= 1000000007
print(t)

Solution (Python):
N = int(input())

ans = 1

for x in range(1, N+1):
    ans = ans * x % 1000000007

print(ans)

Solution (Python):
mod=10**9+7
ans=1
for i in range(1,1+int(input())):
    ans=ans*i%mod
print(ans)

Solution (Python):
import math

n = int(input())

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

print(ans)

Solution (Python):
N = int(input())
power = 1

for i in range(1, N+1):
    power = power * i
    power = power % (10**9 + 7) 

print(power)

Solution (Python):
n = int(input())
power = 1
for i in range(1, n + 1):
  power = power * i % (1000000007)
print(power)

Solution (Python):
import math
print(math.factorial(int(input())) % 1000000007)

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % 1000000007)

Solution (Python):
ans = 1
for k in range(1, int(input())+1):
    ans = ans*k % (10**9+7)
print(ans)

Solution (Python):
from math import factorial
print(factorial(int(input())) % (10**9+7))

Solution (Python):
import math
mod = 10 ** 9 + 7
n = int(input())
print(math.factorial(n) % mod)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
N= int(input())
ans = 1
for i in range(N):
	ans *= i+1
	ans %= 10**9 +7

print(ans)

Solution (Python):
N = int(input())

result = 1
for i in range(1, N + 1):
    result = (result * i) % 1000000007

print(result)

Solution (Python):
n = int(input())
count = 1

for i in range(1, n+1):
    count = (count * i) % (10**9 + 7)

print(count)

Solution (Python):
n=int(input())
a=1
for i in range(1,n+1):
  a=a*i
  if a>10**9+7:
    a=a%(10**9+7)
    
print(a)

Solution (Python):
n=int(input())
power=1

for i in range(n):
  power= power*(i+1)
  if power > ((10**9)+7):
    power = power%((10**9)+7)

print(power)

Solution (Python):
n = int(input())
p = 1
wari = 10**9+7
for i in range( 1,n + 1):
	p  = (p*i)%wari
print(str(p%wari))

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

Solution (Python):
n = int(input())
ans = 1
for i in range(1, n+1):
    ans *= i
    ans = ans % (1e9 + 7)
print(int(ans))

Solution (Python):
import math
import sys

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    ans = 1
    for i in range(2, N + 1):
        ans *= i
        ans %= 1e9 + 7
    return int(ans)


if __name__ == "__main__":
    print(solve())

Solution (Python):
c = 1
for i in range(1, int(input()) + 1):
    c = (c * i) % (10 ** 9 + 7)
print(c)

Solution (Python):
from math import factorial as f
print(f(int(input()))%(10**9+7))

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N + 1):
    ans = (i * ans) % (10 ** 9 + 7)
print(ans)

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


n = II()

ans = 1
for i in range(1, n + 1):
    ans *= i
    ans %= MOD

print(ans)

Solution (Python):

N = int(input())
p = 1
N1097 = 10**9 + 7 
for i in range(N):
    p *= (i+1)
    p %=  N1097
print(p)

Solution (Python):
int_n = int(input())

power = 1

for i in range(1, int_n + 1):
    power = (power * i) % (10 ** 9 + 7)

print(power)

Solution (Python):
N = int(input())

ans,modulo = 1,10**9+7
for i in range(1,N+1):
    ans *= i
    ans %= modulo

print(ans)

Solution (Python):
n = int(input())
ans = 1
mod = 1000000007
for i in range(2, n + 1):
    ans *= i
    ans %= mod
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
import math
f = math.factorial(int(input()))
q = 10**9+7
k = f % q
print(k)

Solution (Python):
import math
f = math.factorial(int(input()))
q = 10**9+7
k = f % q
print(k)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
MOD = 10 ** 9 + 7

N = int(input())

ans = 1
for i in range(1, N + 1):
    ans *= i
    ans %= MOD
print(ans)

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N+1):
    ans = (i * ans) % (10**9+7)
print(ans)

Solution (Python):
n=int(input())
a=[1]*100001
for i in range(1,100001):
    a[i]=(a[i-1]*(i+1))%1000000007
print(a[n-1])

Solution (Python):
n = int(input())

mod = 10 ** 9 + 7
ans = 1
for i in range(n):
    ans = (ans * (i + 1)) % mod
print(ans)

Solution (Python):
n = int(input())

ans = 1
while(n>0):
    ans*=n
    ans = ans%(1000000000+7)
    n -= 1

print(ans)

Solution (Python):
mod = 10 ** 9 + 7
N = int(input())

ans = 1
for i in range(2, N + 1):
    ans = (ans * i) % mod
print(ans)

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

Solution (Python):
s=1
for i in range(int(input())):
  s=(s*(i+1))%1000000007
print(s)

Solution (Python):
N=int(input())

answer=1
n=N

while(1):
    if n==1:
        break
    answer*=n
    answer%=10**9+7
    n=n-1


print(answer)

Solution (Python):
a = int(input())
s = 1
for i in range(1,a+1):
    s*=i
    s=s%1000000007
print(s)

Solution (Python):
def an(a):
    z=1
    for i in range(2,a+1):
        z=z*i%(10**9+7)
    return z
print(an(int(input())))

Solution (Python):
import math
n = int(input())
val = math.factorial(n)
ans = val % (10**9 + 7)

print(ans)

Solution (Python):
import math
N = int(input())
P = math.factorial(N)
print(P % (10**9 + 7))

Solution (Python):



def main():
    """Function."""
    n = int(input())

    temp = 1
    for i in range(n):
        n = i + 1
        temp = temp * n % (10**9 + 7)
    print(int(temp))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    _, ans = divmod(ans * i, 1000000007)
print(ans)

Solution (Python):
N = int(input())
mod = 10**9+7
x = 1
for i in range(1,N+1):
  x = i * x % mod
print(x)

Solution (Python):
def main():
    n = int(input())
    p = 1
    for i in range(2, n + 1):
        p = (p * i) % 1000000007
    print(p)


if __name__ == '__main__':
    main()

Solution (Python):

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

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

Solution (Python):
n = int(input())

s = 1
m = (10 ** 9) + 7
for i in range(n):
    s = (s * (i+1)) % m
print(s)

Solution (Python):
N = int(input())
ans = 1
dev = 1000000007
for i in range(1, N+1):
  ans = i * ans % dev
print(ans)

Solution (Python):
N = int(input())

power = 1
for i in range(1,N+1) :
    power = i * (power % 1000000007)

print(power % 1000000007)

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

Solution (Python):
N = int(input())
a = 1
for i in range(N):
    a = a*(i+1)
    a = a%(10**9 + 7)
print(a)

Solution (Python):
n = int(input())
t = 1
mod = 10**9 + 7
for i in range(1, n + 1):
    t *= i
    t = t % mod
print(t)

Solution (Python):
N = input()
print reduce(lambda x, y: x * y % (10 ** 9 + 7),  range(1, N + 1))

Solution (Python):
N = input()
res = 1
for i in range(1, N + 1):
    res *= i
    res %= 10 ** 9 + 7
print res