CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))
mod = 10 ** 9 + 7

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

# Optimized solution
N = int(eval(input()))
mod = 10 ** 9 + 7

power = 1
for i in range(1, N+1):
  power *= i
  power %= mod
  
print((power % mod))
# Original solution
n  = int(eval(input()))

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

s = 10**9 + 7

print((ans % s))

# Optimized solution
import math
n  = int(eval(input()))
 
ans = math.factorial(n)
 
s = 10**9 + 7
 
print((ans % s))
# Original solution
c=int(eval(input()))
p=1
m=10**9+7
for i in range(c):
  p*=i+1
print((p%m))

# Optimized solution
c=int(eval(input()))
p=1
m=10**9+7
for i in range(2,c+1):
  p=(p*i)%m
print(p)
# Original solution
n=int(eval(input()))
power=1
for i in range(1, n+1):
    power *=i
answer=power%(10**9+7)
print(answer)


# Optimized solution
n=int(eval(input()))
power=1
for i in range(1, n+1):
    power = power*i%(10**9+7)
print(power)
# Original solution
a=int(eval(input()))
ans=1
for i in range(a):
  ans*=(i+1)
  

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

# Optimized solution
a=int(eval(input()))
import math

b=math.factorial(a)
print((b%(10**9+7)))
# Original solution
n = int(eval(input()))
INF = 10**9+7

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

# Optimized solution
n = int(eval(input()))
INF = 10**9+7

ans = 1
for i in range(1, n+1):
    ans = (i * ans)%INF 
print(ans)
# Original solution
N = int(eval(input()))
p = 1
for i in range(N):
  p *= i+1
print((p % (pow(10, 9) + 7)))


# Optimized solution
N = int(eval(input()))
p = 1
for i in range(N):
  p *= i+1
  p = p % (pow(10, 9) + 7)
print(p)
# Original solution
n = int(eval(input()))

power=1
index=2
while index < n+1:
    power*=index
    index+=1

if power > 10**9 + 7:
    print((power%(10**9 + 7)))
else:
    print(power)

# Optimized solution
n = int(eval(input()))

if n < 5000:
    power=1
    index=2
    while index < n+1:
        power*=index
        index+=1
elif n == 5000:
    power = 541108809 + (10**9 + 7)*2
elif n > 5000 and n < 40000:
    power = 541108809
    index = 5001
    while index < n+1:
        power*=index
        index+=1
elif n == 40000:
    power = 422550956 + (10**9 + 7)*2
elif n > 40000 and n < 70000:
    power = 422550956
    index = 40001
    while index < n+1:
        power *= index
        index += 1
elif n == 70000:
    power = 296716438 + (10**9 + 7)*2
else:
    power = 296716438
    index= 70001
    while index < n+1:
        power *= index
        index += 1

if power > 10**9 + 7:
    print((power%(10**9 + 7)))
else:
    print(power)
# Original solution
# -*- coding:utf-8 -*-
n = int(eval(input()))

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


# Optimized solution
# -*- coding:utf-8 -*-
n = int(eval(input()))

p = 1
for i in range(n):
    p = (p * (i+1))%1000000007
print(p)
# Original solution
#abc055 b 
n=int(eval(input()))
ans=1
for i in range(1,n+1):
    ans*=i 
mod=10**9+7
print((ans%mod))

# Optimized solution
#abc055 b
n=int(eval(input()))
ans=1
mod=10**9+7
for i in range(1,n+1):
    ans*=i
    ans=ans%mod

print((ans%mod))
# Original solution
n=int(eval(input()))
ans=1
for i in range(1,n+1):
  ans*=i
print((ans%(10**9+7)))

# Optimized solution
n=int(eval(input()))
ans=1
for i in range(1,n+1):
  ans*=i
  if ans>10**9+7:
      ans=ans%(10**9+7)
print((ans%(10**9+7)))
# Original solution
N = int(eval(input()))
power = 1
for _ in range(1, N + 1):
    power *= _

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

# Optimized solution
N = int(eval(input()))
power = 1
for _ in range(1, N + 1):
    power *= _
    if power > 10**9 + 7:
        power %= (10**9 + 7)

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

# Optimized solution
n = int(eval(input()))
answer = 1
for i in range(1,n+1):
	answer = (answer*i)%(10**9+7)
print(answer)
# Original solution
n = int(eval(input()))
p = 1
for i in range(1, n + 1):
    p *= i
print((p % (10 ** 9 + 7)))

# Optimized solution
n = int(eval(input()))
p = 1
for i in range(1, n + 1):
    p = i * p % (10 ** 9 + 7)
print(p)
# Original solution
N = int(eval(input()))
ans = 1
for i in range(1, N+1):
    ans *= i
print((ans % (10**9 + 7)))

# Optimized solution
N = int(eval(input()))
ans = 1
for i in range(1, N+1):
    ans =ans * i % (10**9 + 7)
print(ans)
# Original solution
import sys

def dfs():
    return

def resolve():
    N = int(eval(input()))
    power = 1

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

    print(power)


if __name__ == "__main__":
    resolve()


# Optimized solution
def resolve():
  n = int(eval(input()))
  ans = 1
  for i in range(1, n+1):
    ans *= i
    ans %= 1000000007
  print(ans)
  return

if __name__ == "__main__":
  resolve()
# Original solution
N= int(eval(input()))
p=1
for i in range(N):
  p *= (i+1)
print((p%(10**9+7)))

# Optimized solution
import math
N= int(eval(input()))
print((math.factorial(N)%(10**9+7)))
# Original solution
n = int(eval(input()))
j = 1
for i in range(1,n+1):
  k = i * j
  j = k
print((k%(10**9+7)))

# Optimized solution
import math
n = int(eval(input()))
k = math.factorial(n)
print((k%(10**9+7)))
# Original solution
N = int(eval(input()))

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

# Optimized solution
N = int(eval(input()))
MOD = 10**9 + 7

p = 1
for i in range(1, N+1):
  p = (p * i) % MOD
 
print(p)
# Original solution
import math
f = math.factorial(int(eval(input())))
q = 10**9+7
k = f % q
print(k)


# Optimized solution
import sys
input = sys.stdin.readline
import math
f = math.factorial(int(eval(input())))
q = 10**9+7
k = f % q
print(k)
# Original solution
n = int(eval(input()))
power = 1
for i in range(1,n+1):
    power *= i
print((power % (10**9 + 7)))

# Optimized solution
import math
n = int(eval(input()))
power = 1
print((math.factorial(n) % (10**9 + 7)))
# Original solution
# B - Training Camp
def main():
    n = int(eval(input()))
    ans = 1

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

  
        
if __name__ == '__main__':
    main()

# Optimized solution
# B - Training Camp
def main():
    import math
    n = int(eval(input()))
    
    
    print((math.factorial(n)%(10**9+7)))

  
        
if __name__ == '__main__':
    main()
# Original solution
MOD = 10 ** 9 + 7
n = int(eval(input()))
ans = 1
a = (i for i in range(1, n + 1))
for i in a:
    ans *= i
print((ans % MOD))

# Optimized solution
MOD = 10 ** 9 + 7
n = int(eval(input()))
ans = 1
a = (i for i in range(1, n + 1))
for i in a:
    ans = ans * i % MOD
print(ans)
# Original solution
n = int(eval(input()))
s = 1
for i in range(1, n + 1):
    s = s * i
print((s % (10 ** 9 + 7)))


# Optimized solution
n = int(eval(input()))
s = 1
m = 10 ** 9 + 7
for i in range(1, n + 1):
    s = (s * i) % m
print(s)
# Original solution
N = int(input())
x = 1
for i in range(N):
    x *= i+1

print(x%1000000007)

# Optimized solution
# coding:utf-8

import sys
# from collections import Counter, defaultdict

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 eval(input())


n = II()

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

print(ans)
# Original solution
n = int(eval(input()))
ans = 1
for i in range(1, n+1):
    ans *= i

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

# Optimized solution
import math
n = int(eval(input()))
ans = math.factorial(n)

print((ans % (10**9+7)))
# Original solution
N=int(eval(input()))

ans=1

BIG=1000000007

for n in range(1,N+1):
  ans=ans*n
  ans=ans%BIG

print(ans)


# Optimized solution
n = int(eval(input()))
ans = 1
mod = 10**9+7
for i in range(1,n+1):
    ans = ans*i%mod
print(ans)
# Original solution
n = int(eval(input()))
r = 1
for i in range(2, n+1):
    r *= i%(10**9+7)
print((r%(10**9+7)))

# Optimized solution
n = int(eval(input()))
r = 1
for i in range(2, n+1):
    r *= i
    r %= 10**9+7
print(r)
# Original solution
N = int(eval(input()))

k = 1
for i in range(1, N+1):
  k *= i

ans = k % (10**9 +7)
print(ans)

# Optimized solution
N = int(eval(input()))

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

print(ans)
# Original solution
n = int(eval(input()))

p = 1

for i in range(1,n):
	p += p * i

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

# Optimized solution
n = int(eval(input()))

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

print(p)
# Original solution
N = int(eval(input()))
x = 10**9 + 7

dp = 1

for i in range(1, N+1):
    dp *= i

print((dp % x))

# Optimized solution
import math

N = int(eval(input()))
x = 10**9 + 7

ans = math.factorial(N)

print((ans % x))
# Original solution
n = int(eval(input()))

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

# Optimized solution
import math
print((math.factorial(int(eval(input())))%(10**9+7)))
# Original solution
N=int(eval(input()))
p=1
for i in range(N):
  p*=(i+1)
#  p=p%(10**9+7)

p=p%(10**9+7)
print(p)

# Optimized solution
N=int(eval(input()))
p=1
for i in range(N):
  p*=(i+1)
  p=p%(10**9+7)
print(p)
# Original solution
n=int(eval(input()))
i=1
j=1
while j!=n+1:
    i=i*j
    j+=1
print((i%(10**9+7)))

# Optimized solution
n=int(eval(input()))
i=1
j=1
while j!=n+1:
    i=(i*j)%(10**9+7)
    j+=1
print(i)
# Original solution
n = int(eval(input()))
p = 1
for i in range(n):
    p = (p * (i + 1)) % (10 ** 9 + 7)
print(p)


# Optimized solution
n = int(eval(input()))
p = 1
for i in range(1, n + 1):
    p = (p * i) % (10 ** 9 + 7)
print(p)
# Original solution
from math import factorial as fc
a = int(eval(input()))
print((fc(a)%(10**9+7)))

# Optimized solution
n = int(eval(input()))
m = 10**9+7
ans = 1
for i in range(1, n+1):
  ans *= i
  ans %= m
print(ans)
# Original solution
def main():
    n = int(eval(input()))
    ans = 1
    mod = 10**9 + 7
    for i in range(1,n+1):
        ans *= i
    print((ans%mod))

if __name__ == '__main__':
    main()


# Optimized solution
import math

def main():
    n = int(eval(input()))
    mod = 10**9 + 7
    print((math.factorial(n)%mod))


if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
ans = 1
for i in range(1,n+1):
    ans *= i
print((ans%1000000007))

# Optimized solution
import math 
n = int(eval(input()))
print((math.factorial(n)%1000000007))
# Original solution
n = int(eval(input()))


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


# Optimized solution
n = int(eval(input()))

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

print(k)
# Original solution
n=int(eval(input()))
p=1
for i in range(n):
  p*=i+1
print((p%(10**9+7)))  

# Optimized solution
import math
n=int(eval(input()))
print((math.factorial(n)%(10**9+7)))
# Original solution
from math import factorial
print((factorial(int(eval(input())))%(10**9+7)))

# Optimized solution
from math import *
print((factorial(int(eval(input())))%(10**9+7)))
# Original solution
n = int(eval(input()))
ans = 1
for i in range(1, n + 1):
  ans *= i
print((ans % 1000000007))

# Optimized solution
n = int(eval(input()))
ans = 1
for i in range(1, n + 1):
  ans = i * ans % 1000000007
print(ans)
# Original solution
n = int(eval(input()))
ans = 1
mod = 10 ** 9 + 7
for i in range(1, n + 1):
    ans *= i % mod
print((ans % mod))

# Optimized solution
n = int(eval(input()))
ans = 1
mod = 10 ** 9 + 7
for i in range(1, n + 1):
    ans = (ans * i % mod)
print((ans % mod))
# Original solution
N = list(range(1, int(eval(input())) + 1))
prod = 1
for i in N:
    prod *= i
print((prod % (10**9 + 7)))


# Optimized solution
num = 1
for i in range(1, int(eval(input())) + 1):
  num = (num * i) % (10**9 + 7)
print(num)
# Original solution
n = int(eval(input()))

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

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

# Optimized solution
n = int(eval(input()))

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

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

# Optimized solution
N = int(eval(input()))
mod = 10 ** 9 + 7
power = 1
for i in range(N):
    power = power * (i + 1) % mod
print(power)
# Original solution
n = int(eval(input()))
power = 1
for i in range(1,n + 1):
    power *= i
print((power % (10**9 + 7)))

# Optimized solution
import math
n = int(eval(input()))
power = math.factorial(n)
print((power % (10**9 + 7)))
# Original solution
# -*- coding: utf-8 -*-

n = int(input())

power = 1

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

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

# Optimized solution
# -*- coding: utf-8 -*-

n = int(input())

power = 1
m = 10**9 + 7

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

print(power)
# Original solution
import functools
import operator

N = int(eval(input()))

L = list(range(1, N+1, 1))
prod = functools.partial(functools.reduce, operator.mul)

print((prod(L)%(10**9+7)))


# Optimized solution
N = int(eval(input()))
calc = 1
for i in range(1, N+1):
    calc = (i*calc) % (10**9+7)

print(calc)
# Original solution
n = int(eval(input()))
p = list(range(1, n+1))
mod = (10 ** 9) + 7

x = 1

for i in p:
    x *= i

print((x%mod))

# Optimized solution
n = int(eval(input()))

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

print((power(n)))
# Original solution
N = int(eval(input()))
p = 1
for i in range(2, N + 1):
    p *= i
print((p % (10**9 + 7)))

# Optimized solution
N = int(eval(input()))
p = 1
for i in range(2, N + 1):
    p *= i
    p %= 10**9 + 7
print(p)
# Original solution
a = int(eval(input()))
s = 1
for i in range(1,a+1):
    s*=i
print((s%1000000007))

# Optimized solution
a = int(eval(input()))
s = 1
for i in range(1,a+1):
    s*=i
    s=s%1000000007
print(s)
# Original solution
n = int(eval(input()))

sunuke = 1

li = [i for i in range(1,n+1)]
for j in range(n):
    sunuke=sunuke*li[j]

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

# Optimized solution

n = int(eval(input()))

sunuke = 1

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


print(sunuke)
# Original solution
n = int(eval(input()))
pow = 1
for i in range(1,n+1):
    pow *= i
print((pow%(10**9+7)))


# Optimized solution
from math import factorial
print((factorial(int(eval(input())))%(10**9+7)))
# Original solution
N = int(eval(input()))
p = 1
for i in range(N):
    p *= (i + 1)
    p %= (1e9 + 7)
print((int(p)))

# Optimized solution
N = int(eval(input()))
p = 1
for i in range(N):
    p = p * (i + 1) % (1e9 + 7)
print((int(p)))
# Original solution
N = int(eval(input()))
p = 1
for i in range(N):
    p = p * (i + 1) % (1e9 + 7)
print((int(p)))

# Optimized solution
N = int(eval(input()))
MOD = 10 ** 9 + 7
S = 1
for i in range(1, N + 1):
    S = S * i % MOD
print((S % MOD))
# Original solution
N = int(eval(input()))

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


# Optimized solution
import math
N = int(eval(input()))

power = math.factorial(N)
result = power % (pow(10, 9) + 7)
print(result)
# Original solution
n=int(eval(input()))
mod=10**9+7
ans=1
for i in range(1,n+1):
    ans*=i
print((ans%mod))

# Optimized solution
import math
n=int(eval(input()))
mod=10**9+7
print((math.factorial(n)%mod))
# Original solution
INF = 1000000007


def modmulti(a, b):
    # aとbを掛けた値をmodする(a * b mod p)
    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(eval(input()))

ans = 1

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

print(ans)


# Optimized solution
INF = 1000000007


def modmulti(a, b):
    # aとbを掛けた値をmodする(a * b mod p)
    return a * b % INF


N = int(eval(input()))

ans = 1

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

print(ans)
# Original solution
n = int(eval(input()))
ans = 1
for i in range(1,n+1):
  ans = ans * i
  
if ans >= (10**9+7):
  ans  =  ans%(10**9+7)
  
print(ans)


# Optimized solution
n = int(eval(input()))
ans = 1
for i in range(1,n+1):
  ans =  i* ans%(10**9+7) 

  
print(ans)
# Original solution
N = int(eval(input()))

devide = 10 ** 9 + 7

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

ans = power % devide
print(ans)

# Optimized solution
N = int(eval(input()))

devide = 10 ** 9 + 7

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

#power %= devide
print(power)
# Original solution
n = int(eval(input()))
power = 1

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

ans = power % (pow(10, 9) + 7)
print(ans)

# Optimized solution
import math

n = int(eval(input()))
ans = math.factorial(n) % (pow(10, 9) + 7)
print(ans)
# Original solution
import math

n = int(eval(input()))
ans = math.factorial(n) % (pow(10, 9) + 7)
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 1
mod = 10 ** 9 + 7
for i in range(1, n + 1):
    ans = (ans * i % mod) % mod
print(ans)
# Original solution
import math
print((math.factorial(int(eval(input())))%(10**9+7)))

# Optimized solution
n=int(eval(input()))
ans=1
for i in range(2, n+1):
    ans=(ans*i)%1000000007
print(ans)
# Original solution
import math

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

print('{:d}'.format(ans%mod))


# Optimized solution
import math
 
n = int(input())
mod = pow(10,9) + 7
ans = 1
for i in range(1,n+1):
  ans = (ans*i)%mod
 
print(ans)
# Original solution
n = int(eval(input()))
power = 1

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

power = power%(1000000000+7)

print(power)

# Optimized solution
n = int(eval(input()))
power = 1

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



print(power)
# Original solution
n = int(eval(input()))
ans = 1
for i in range(2,n+1):
    ans*=i
ans = ans % (pow(10,9)+7)
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 1
p = pow(10,9)+7
for i in range(2,n+1):
    ans = (i * ans)%p
print(ans)
# Original solution
N = int(eval(input()))
power = 1
a = 10**9 + 7
for i in range(1,N+1,1):
    power = power*i
print((power%a))


# Optimized solution
N = int(eval(input()))
ans = 1
for i in range(1,N+1,1):
    ans = (ans*i)%(10**9+7)
print(ans)
# Original solution
N = int(eval(input()))
pwr = 1
for i in range(1, N+1):
    pwr = pwr * i
print((pwr % (10**9+7)))

# Optimized solution
N = int(eval(input()))
pwr = 1
for i in range(1, N+1):
    pwr = (pwr * i)%(10**9+7)
print(pwr)
# Original solution
n = int(eval(input()))
ans = 1

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

# Optimized solution
n = int(eval(input()))
ans = 1
ex = 10**9 + 7
for i in range(1, n + 1):
  ans =  ans * i % ex

print(ans)
# Original solution
N=int(eval(input()))
ans=1
for i in range(1,N+1):
  ans*=i
print((ans%(10**9 +7)))

# Optimized solution
import math
N=int(eval(input()))
ans=math.factorial(N)
print((ans%(10**9 +7)))
# Original solution
import math
N=int(eval(input()))
ans=math.factorial(N)
print((ans%(10**9 +7)))

# Optimized solution
mod=10**9+7
N=int(eval(input()))
ans=1
for i in range(1,N+1):
  ans*=i
  ans%=mod
print(ans)
# Original solution
N=int(eval(input()))
x=1
z=10**9+7
for n in range(1,N+1):
  x*=n
print((x%z))

# Optimized solution
N=int(eval(input()))
x=1
z=10**9+7
for n in range(1,N+1):
  x*=n
  x%=z
print(x)
# Original solution
import math

n = int(eval(input()))

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

# Optimized solution
mod = 10**9+7
ans = 1
for i in range(int(eval(input()))):
    ans *= i+1
    ans %= mod
print(ans)
# Original solution
import math
print((math.factorial(int(eval(input())))%(10**9+7)))

# Optimized solution
n = int(eval(input()))
ans = 1
for i in range(1, n +1):
    ans*= i
    ans = ans % (10**9 + 7)
print(ans)
# Original solution
N = int(eval(input()))
i = 1
power = 1
while i <= N:
    power = power * i
    i += 1
print((power%(10**9+7)))

# Optimized solution
import math
N = int(eval(input()))
power = math.factorial(N)
print((power%(10**9+7)))
# Original solution
def resolve():
    n = int(eval(input()))
    power = 1

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

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

if __name__ == '__main__':
    resolve()

# Optimized solution
import math
def resolve():
    n = int(eval(input()))
    power = 1

    power = power * math.factorial(n)

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

if __name__ == '__main__':
    resolve()
# Original solution
N = int(eval(input()))
power = 1
for i in range(1, N+1):
    power *= i
print((power % (10**9+7)))


# Optimized solution
from math import factorial as F
N = int(eval(input()))
print((F(N) % (10**9+7)))
# Original solution
n = int(eval(input()))
t = 1
for i in range(1, n+1):
    t *= i
print((t % (10**9+7)))

# Optimized solution
n = int(eval(input()))
t = 1
d = 10**9+7
for i in range(1, n+1):
    t = t * i % d
print(t)
# Original solution
def TrainingCamp():
    N = int(eval(input()))
    power = 1
    for i in range(1, N + 1):
        power *= i
    print((power % (10 ** 9 + 7)))

TrainingCamp()


# Optimized solution
def TrainingCamp():
    mod = 10 ** 9 + 7
    N = int(eval(input()))
    power = 1
    for i in range(1, N + 1):
        power *= i
        power %= mod
    print(power)

TrainingCamp()
# Original solution
N = int(eval(input()))

ans = 1

for i in range(N):

    ans *= i+1

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

# Optimized solution
import math


N = int(eval(input()))

print((math.factorial(N) % (10**9+7)))
# Original solution
power = 1
for i in range(int(eval(input()))):
	power *= i+1
print((power % (10**9+7)))

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

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

# Optimized solution
n = int(eval(input()))

ans = 1
for i in range(1,n+1):
    ans *= i
    ans = ans%1000000007 
print(ans)
# Original solution
N = int(eval(input()))
P = 1
for i in range(N):
	t = i+1
	P = P*t
P = P%(10**9+7)
print(P)

# Optimized solution
N = int(eval(input()))
P = 1
for i in range(N):
	t = i+1
	P = (P*t)%(10**9+7)
print(P)
# Original solution
def main():
    N = int(eval(input()))
    power = 1
    for i in range(N):
        power *= (i + 1)
    print((power%(1000000000 + 7)))
main()

# Optimized solution
import math
def main():
    N = int(eval(input()))
    power = math.factorial(N)
    print((power%(1000000000 + 7)))
main()
# Original solution
N = int(eval(input()))

ans = 1

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

print((int(ans%(1e9+7))))

# Optimized solution
N = int(eval(input()))
ans = 1
for i in range(1, N+1):
    ans *= i%(10**9+7)
    ans = ans%(10**9+7)
print(ans)
# Original solution
power = 1
x = int(eval(input()))
for a in range(1, x + 1):
  power = power * a
  
power = power % (10**9 + 7)
print(power)

# Optimized solution
power = 1
x = int(eval(input()))
for a in range(1, x + 1):
  power = (power * a) % (10**9 + 7)

print(power)
# Original solution
n = int(eval(input()))
power = 1

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

# Optimized solution
n = int(eval(input()))
power = 1

for x in range(1, n+1):
  power = (power * x) % (10 ** 9 + 7) 
  
print(power)
# Original solution
n=int(eval(input()))
k=1
for i in range(1,n+1):
    k=k*i
print((k%1000000007))

# Optimized solution
n=int(eval(input()))
k=1
for i in range(1,n+1):
    k=k*i%1000000007
print(k)
# Original solution
n = int(eval(input()))
cnt = 1
for i in range(1, n+1):
  cnt *= i

r = cnt % (10**9 + 7)
print(r)
  

# Optimized solution
import math
n = int(eval(input()))
print((math.factorial(n) % (10**9 + 7)))
# Original solution
n = int(eval(input()))

ans = 1

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

print((ans%1000000007))



# Optimized solution
n = int(eval(input()))

#nの階乗の計算 n!
import math
k = math.factorial(n)

print((k%1000000007))
# Original solution
n=int(eval(input()))
p=1
for i in range(1, n+1):
    p*=i

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

# Optimized solution
n = int(eval(input()))
p = 1
q = 10**9+7
for i in range(1, n+1):
    p = (p*i) % q

print(p)
# Original solution
n=int(eval(input()))
i = 1
for nn in range(1,n+1):
  i *= nn
  
print((i%(10**9+7)))

# Optimized solution
import math
print((math.factorial(int(eval(input())))%(10**9+7)))