CodeEff/ECCO huggingface dataset:
# Original solution
N=int(eval(input()))

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


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

A=1
for i in range(1,N+1):
    A=A*i
    A=A%(7+10**9)
print(A)
# 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
x = 10 ** 9 + 7
for i in range(1, n+1):
    s = s * i % x
print(s)
# Original solution
n=int(eval(input()))
c=1
for i in range(n):
    c*=(i+1)
print((c%(10**9+7)))


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

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

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

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

# Optimized solution
ans=1
a=[i for i in range(1,int(eval(input()))+1)]
for i in a:
  ans*=i
  ans%=10**9+7
print(ans)
# 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()))
p = 1
for i in range(1, n+1):
    p = p * i
    p = p % (10 ** 9 + 7)
print((p % (10 ** 9 + 7)))
# Original solution
#55
n = int(eval(input()))
ans = 1
for i in range(1, n+1):
    ans *= i
print((ans%(10**9+7)))

# Optimized solution
#55改
import math
n = int(eval(input()))
ans =math.factorial(n)
print((ans%(10**9+7)))
# Original solution
a=int(eval(input()))
Sum=1

for i in range(1,a+1):
    Sum*=i

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


# Optimized solution
a=int(eval(input()))
Sum=1
b=10**9+7

for i in range(1,a+1):
    Sum=(Sum*i)%b

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

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

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

res = fact % 1000000007
print(res)

# Optimized solution
N = int(eval(input()))
fact = 1
for integer in range(1,N+1):
    fact = fact * integer % 1000000007
print(fact)
# 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
big_num = 10**9+7
for i in range(1,N+1):
    p *= i 
    p %= big_num

print(p)
# Original solution
#coding: UTF-8
N=int(eval(input()))
out=1
for i in range(1,N+1):
    out=out*i
print((out%(10**9+7)))

# Optimized solution
#coding: UTF-8
import math
N=int(eval(input()))
out=math.factorial(N)
print((out%(10**9+7)))
# Original solution
def main():
    N = int(eval(input()))

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

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

if __name__ == '__main__':
    main()


# Optimized solution
def main():
    N = int(eval(input()))

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

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

if __name__ == '__main__':
    main()
# 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()))
k = 1
for i in range(1,n+1):
  k = k*i%(10**9+7)
print(k)
# Original solution
n = int(eval(input()))
p = 1
for i in range(1, n + 1):
    p = p * i
print((p % 1000000007))


# Optimized solution
import math

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

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

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

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


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

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

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

ans = power % A

print(ans)

# Optimized solution
N = int(eval(input()))
power = 1
A = 10**9 + 7

  #yをxで割った時の商をa、余りをbとすると、y=ax+b
  #ここにiを掛けると、y=(ax+b)i
  #y=aix+bi、となるので第１項は余りが０になる
  #なので、毎回割って、その余りにのみ注目すれば良い

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

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

a=1

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

a%=1000000007

print(a)

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

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

n = int(eval(input()))

power = 1

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


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

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

for i in range(1, n + 1):
    ans = 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

N = int(eval(input()))
p = 1

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

print((p % 1000000007))


# Optimized solution

N = int(eval(input()))
p = 1

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

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

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

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

# Optimized solution
n,a = int(eval(input())),1
for i in range(n):
    a = a*(i+1)%(10**9+7)
print(a)
# 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
import math
N = int(eval(input()))
p = math.factorial(N)
print((int(p%(10**9+7))))
# Original solution
n = int(eval(input()))

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

mod = 10 ** 9 + 7
ans = power % mod
print(ans)


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

from math import factorial

power = factorial(n)
mod = 10 ** 9 + 7
ans = power % mod
print(ans)
# Original solution
n = int(eval(input()))

from math import factorial

power = factorial(n)
mod = 10 ** 9 + 7
ans = power % mod
print(ans)


# 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)
# Original solution
N=int(eval(input()))
ans=1
for i in range(1,N+1):
  ans*=i

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

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

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


# Optimized solution
n=int(eval(input()))
def a(x):
  if x==1:
    return 1
  else:
    d=1
    for i in range(x+1)[1:]:
      d *= i
      d %= 10**9+7
    return d
print((a(n)))
# Original solution
n = int(input().split()[0])
warukazu = 10 ** 9 + 7
x = 1
for i in range(1, n+1):
    x = x * i

print((x % warukazu))

# Optimized solution
n = int(input().split()[0])
warukazu = 10 ** 9 + 7
x = 1
for i in range(1, n+1):
    x = (x * i) % warukazu

print((x % warukazu))
# 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=p*i%(10**9+7)
print(p)
# Original solution
n=int(eval(input()))
r=1
for i in range(1,n+1):
    r=r*i
print((r%(10**9+7)))

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

# Optimized solution
#Noob

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

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

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

# Optimized solution
N=eval(input())
 
r=1
for i in range(N):
    r=r*(i+1)
    r=r%(10**9 + 7)
 
print(r)
# 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 = (ans * i) % 1000000007
  
print(ans)
# Original solution
INF = 1000000000 + 7
N = int(eval(input()))
ans = 1
for i in range(1, N + 1):
    ans *= i

print((ans % INF))


# Optimized solution
INF = 1000000000 + 7
N = int(eval(input()))
ans = 1
for i in range(1, N + 1):
    ans = ans * i % INF

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


# Optimized solution
if __name__ == '__main__':
    N = int(eval(input()))
    ans = 1
    for i in range(1,N+1) :
        ans *= i
        # 剰余演算の分配則
        ans %= 1000000007
    ans %= 1000000007
    print(ans)
# Original solution
sum = 1
for i in range(1,int(eval(input()))+1):
    sum *= i
print((sum%1000000007))


# Optimized solution
sum = 1
for i in range(1,int(eval(input()))+1):
    sum *= i
    sum %= 1000000007
print(sum)
# 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%=10**9+7
print(ans)
# Original solution
n = int(eval(input()))
power = 1
for i in range(1,n+1):
    power *= i%(10**9+7)
print((power % (10**9 + 7)))


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

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

i=1

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

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

i=1

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

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

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

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

# Optimized solution
n=int(eval(input()))
a=1
for i in range(1,n+1):
    a*=i
    a %= (10**9+7)
print(a)
# 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
n=int(eval(input()))
mod=(10**9)+7
import math
a=math.factorial(n)
# ans=1
# for i in range(1,n+1):
#     ans*=i
print((a%mod))
# Original solution
N = int(eval(input()))
r = 1

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

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

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

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

ans=1
while N>0:
  ans*=N
  N-=1
  
print((ans%DIV))


# Optimized solution
N=int(eval(input()))
ans=1
DIV=10**9+7
while N>1:
  ans=(ans*(N%DIV))%DIV
  N-=1
print(ans)
# Original solution
N=int(eval(input()))
ans=1
DIV=10**9+7
while N>1:
  ans=(ans*(N%DIV))%DIV
  N-=1
print(ans)

# Optimized solution
N=int(eval(input()))
p=1
DIV=10**9+7
for i in range(1,N+1):
  p = (p%DIV * i%DIV) % DIV
  
print(p)
# Original solution
N = int(eval(input()))
p = 1
m = int(1e+9 + 7)
for i in range(1, N + 1):
    p = p * i
    if p > m:
        p = p % m
print(p)

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

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

# Optimized solution
n=int(eval(input()))
x=1
for i in range(1,n+1):
    x=x*i
    x=x%(10**9+7)
print(x)
# Original solution
INF = float('inf')
MOD = 1000000000 + 7

def solve():
    power = 1
    for i in range(1, int(eval(input())) + 1):
        power *= i

    print((power % MOD))


solve()

# Optimized solution
import math
MOD = 10**9 + 7

N = int(eval(input()))
print((math.factorial(N) % MOD))
# Original solution
N = int(eval(input()))

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

if num < (10**9 + 7):
  print(num)
else:
  print((num % (10**9 + 7)))

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

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

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

p=1

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

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

# Optimized solution
import math

N=eval(input())
N=int(N)

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

# 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()))
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*ans%(10**9+7)

print(ans)
# 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()))
p = 1
for i in range(1,N+1):
	p = (p*i)%(10**9+7)
print((p%(10**9+7)))
# 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 = (p*i)%(10**9+7)
print(p)
# Original solution
# -*- coding: utf-8 -*-
import sys

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

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

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

ans = 1

for i in range(1,n+1):
  ans = 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
N = int(eval(input()))
po = 1
for i in range(1,N+1):
    po *= i
print((po%(1000000007)))

# Optimized solution
import math
N = int(eval(input()))
po = math.factorial(N)
print((po%(1000000007)))
# 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
import math

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

# Optimized solution
n=int(eval(input()))
x=1
for i in range(1,n+1):
    x=x*(i%(10**9+7))
    x=x%(10**9+7)
print(x)
# 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 = p * i % 1000000007

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

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

print(p)

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

def training(n):
    power = 1
    for i in range(1, n+1):
        power = power * i % 1000000007
    return power

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

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

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

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

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

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

power_level = 1

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


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

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

power_level = 1

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


print(power_level)
# 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()))
    ans = math.factorial(N)
    mod = 10**9 + 7
    print((ans % mod))


if __name__ == "__main__":
    main()
# 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()))
ans = 1
for i in range(1, n + 1):
  ans *= i
  ans = ans % (10 ** 9 + 7)
print(ans)
# Original solution
import math

N = int(eval(input()))

print((math.factorial(N) % (1000000000 + 7)))


# Optimized solution
import math

N = int(eval(input()))

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

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

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

print((sum%1000000007))

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

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

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

p=1
mod=10**9+7

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

print((p%mod))

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

p=1
mod=10**9+7

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

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


abc()


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


abc()
# 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
n=int(eval(input()))
mod=10**9+7
ans=1
for i in range(1,n+1):
    ans=ans*i%mod
print(ans)
# Original solution
N = int(eval(input()))
ans = 1
for i in range(1,N+1):
    ans = ans * i
print((ans%(10**9+7)))

# 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()))
for i in range(1,N):
    N*=i
print((N%((10**9)+7)))

# Optimized solution
N=int(eval(input()))
a=1
for i in range(1,N+1):
    a=(a*i)%((10**9)+7)
print(a)
# 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 %= 10**9 + 7
print(ans)
# Original solution
import math
print(math.factorial(int(input()))%(10**9+7))

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

# 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()))
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
    ans %= (10 ** 9 + 7)

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

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

print((N % mod))


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

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

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

# Optimized solution
N = int(eval(input()))
power = 1
for i in range(1,N+1):
    power *= i
    power %= 10**9 + 7
print(power)
# 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
import math
n = int(eval(input()))

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

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

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


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

print(x)
#import numpy as np
#n=int(input())
#print(np.prod([i+1 for i in range(n)]))
#print(np.prod([i+1 for i in range(n)])%((10**9)+7))

#オーバーフロー？
# Original solution
n=int(eval(input()))
x=1
for i in range(n):
    x*=(i+1)
    if x>10**9+7:
        x=x%(10**9+7)

print(x)
#import numpy as np
#n=int(input())
#print(np.prod([i+1 for i in range(n)]))
#print(np.prod([i+1 for i in range(n)])%((10**9)+7))

#オーバーフロー？


# Optimized solution
power=1
n=int(eval(input()))
mod=10**9+7
for i in range(1,n+1):
    power*=i
    power%=mod
    #print(power)
print(power)
# Original solution
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

def main():
    n = int(eval(input()))
    mod = 10**9+7

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


if __name__ == '__main__':
    main()


# Optimized solution
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

def main():
    n = int(eval(input()))
    mod = 10**9+7

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


if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))+1
num = 10**9+7
power = 1

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

ans = power % num
print(ans)

# Optimized solution
n = int(eval(input())) + 1
mod = 10**9 + 7
power = 1

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

print(power)