CodeEff/ECCO huggingface dataset:
# 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 = (power*i)%(10**9+7)
print(power)
# Original solution
import math
n = int(eval(input()))
m = 10**9+7
sum = 1
for i in range(2,n+1):
    sum *= (i%m)

print((sum%m))

# Optimized solution
import math

def range_prod(lo,hi):
    if lo+1 < hi:
        mid = (hi+lo)//2
        return range_prod(lo,mid) * range_prod(mid+1,hi)
    if lo == hi:
        return lo
    return lo*hi

def treefactorial(n):
    if n < 2:
        return 1
    return range_prod(1,n)
n = int(eval(input()))
m = 10**9+7
print((treefactorial(n%m)%m))
# 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 '__main__' == __name__:
    resolve()

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


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

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

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

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

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

i =1
j =0
while j <N:
    i=i*(j+1)
    j+=1
print((i%(10**9+7)))

# Optimized solution
import math
print((math.factorial(int(eval(input())))%(10**9+7)))
# 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
import math
x = int(eval(input()))
i=math.factorial(x)
print((i%(10**9+7)))
# Original solution
# coding: utf-8


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

if __name__ == '__main__':
    main()

# Optimized solution
# coding: utf-8


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

if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))

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

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


# Optimized solution
from math import factorial

N = int(eval(input()))

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

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

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

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

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

power = 1

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

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


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

power = 1

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

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

# Optimized solution
lim = 1000000007
result = 1
n = int(eval(input()))

for q in range(n):
    result = result % lim
    result *= q + 1
print((result % lim))
# Original solution
n = int(eval(input()))
p = 1
i = 1
while i < n or i == n:
  p = p*i
  i +=1
x = 10**9
print((p%(x+7)))

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

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

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

import math

N = int(eval(input()))

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

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

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

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

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


if __name__ == "__main__":
    main()

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


if __name__ == "__main__":
    main()
# Original solution
def resolve():
    import sys
    input = sys.stdin.readline
    import functools
    import operator

    n = int(input().rstrip())


    result = functools.reduce(operator.mul, list(range(1, n + 1)))
    print((result % 1000000007))



if __name__ == "__main__":
    resolve()


# Optimized solution
# row = [int(x) for x in input().rstrip().split(" ")]
# n = int(input().rstrip())
# s = input().rstrip()
# row = [int(input().rstrip()) for _ in range(n)]

def resolve():
    import sys
    input = sys.stdin.readline
    import functools
    import operator

    n = int(input().rstrip())

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

    print(ans)



if __name__ == "__main__":
    resolve()
# Original solution
N = int(eval(input()))
mod =10**9+7
ans = 1

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

print((ans%mod))

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

print((math.factorial(N)%mod))
# 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 % ((10**9)+7)))
# Original solution
n=int(eval(input()))

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

# Optimized solution
import math

n=int(eval(input()))

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

print((ans%mod))


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

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

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

# Optimized solution
# Training CampTraining Camp
N = int(eval(input()))

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

print((int(p)))
# Original solution
import math
import copy
import re
mod = 10**9+7

n = int(eval(input()))
neko = 1
for i in range(n):
    neko *= (i+1)
print((neko%mod))

# Optimized solution
import math
import copy
import re
mod = 10**9+7

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

ans = power % 1000000007
print(ans)

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

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

# Optimized solution
def factorial(N):
    a = 1
    for n in range(2,N+1):
        a = a*n % (10**9 + 7)
    return a
 
if __name__ == '__main__':
    N = int(eval(input()))
    print((factorial(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%(10**9+7)
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
# N = int(input())

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

# TLEとなってしまう
# modの世界を使う

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

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

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

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

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

# Optimized solution
import math

n = int(eval(input()))

print((math.factorial(n) % (10**9 + 7)))
# Original solution
import math

n = int(eval(input()))

print((math.factorial(n) % (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()))

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

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


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

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

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

a = pow(10, 9) + 7

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

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

a = pow(10, 9) + 7

power = math.factorial(N)

print((power% a))
# Original solution
ans=1
for _ in range(int(eval(input()))):
    ans*=_+1
    ans%=int(1e9+7)
print(ans)


# Optimized solution
mod = 1000000007
n = int(eval(input()))
ans = 1
for i in range(1, n + 1):
    ans = ans * i % mod
print(ans)
# Original solution
#!/usr/bin/env python

n=int(input().strip())

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

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

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

# Optimized solution
#!/usr/bin/env python

n=int(input().strip())

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

print(power)
# 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()))
M = 1000000007
n=[1]*(N+1)
for i in range(1,N+1):
    n[i] = (n[i-1]*i)%M

print((n[N]))
# Original solution
N = int(eval(input()))

rate=1

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


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

# Optimized solution
from math import factorial

N = int(eval(input()))

print((factorial(N)%(10**9+7)))
# Original solution
import functools
import operator

N = int(eval(input()))
power_list = [x+1 for x in range(N)]
result = functools.reduce(operator.mul, power_list)
print((result % (10**9+7)))

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

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

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

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

# Optimized solution
n = int(eval(input()))
pow=1
for i in range(1,n+1):
    pow = pow*i%(10**9+7)
print(pow)
# 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
c = 10**9+7
for i in range(1,n+1):
  ans *= i
  ans %= c
print(ans)
# 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
#ABC 55, B - training camp
n = int(eval(input()))
p = 1
for i in range(1, n+1):
    p *= i
print((p % (10**9 + 7)))


# Optimized solution
#ABC 55, B - training camp
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()))
a = 10**9 + 7
pow = 1
for i in range(n):
    pow *= i+1
print((pow % a))


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


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

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

print(pow)
# 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
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
for i in range(N):
  if power>10**9+7:
    power=(power%(10**9+7))*(i+1)
  else:
    power=power*(i+1)
 
print((power%(10**9+7)))
#print(power%(10**9+7))
# Original solution
#!/usr/bin/env python3


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


# Optimized solution
#!/usr/bin/env python3


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(input().strip())

ans = 1

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

# Optimized solution
n = int(input().strip())

ans = 1

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


# 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
i = int(eval(input()))
p = 1
m = (10 **9)+7 
for ii in range(1,i+1):
	ii %= m
	p *= ii

print((p % m))
          

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

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

# Optimized solution
A = int(eval(input()))
b = 1
mod = 1000000007
for a in range(1,A+1):
  b = b*a % mod
print(b)
# Original solution
n=int(eval(input()))
d=1
for i in range(2,n+1):
  d*=i
print((int(d%int(7+1e9))))

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

N = int(eval(input()))

print((training(N)))

# Optimized solution
def training(N) :
  power = 1
  for i in range(1, N + 1) : 
    power = (power * i) % (10 ** 9 + 7)
    
  return power

N = int(eval(input()))

print((training(N)))
# Original solution

line = int(eval(input()))

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

# Optimized solution

line = int(eval(input()))

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

power = 1

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

power %= 1000000007

print(power)

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

power = 1

for i in range(1, _input + 1):
  if power >= 1000000007:
    power %= 1000000007
  power *= i

power %= 1000000007

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

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


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

m = 10 ** 9 + 7

print((math.factorial(n) % m))
# 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
    if power>10**9+7:
        power=power%(10**9+7)
print((power%(10**9+7)))
# Original solution
N = int(eval(input()))
pow = 1
for i in range(1,N+1):
        pow = pow*i
num = 10**9+7
print((pow%num))

# Optimized solution
N = int(eval(input()))
pow = 1
num = 10**9+7
for i in range(1,N+1):
        pow = pow*i%num
print((pow%num))
# Original solution
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return list(map(int,sys.stdin.readline().rstrip().split()))
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
xx = 10**9+7
ans = 1
for i in range(1, N+1):
    ans = ans*i
print((ans%xx))

# Optimized solution
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return list(map(int,sys.stdin.readline().rstrip().split()))
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
print((math.factorial(N)%(10**9+7)))
# Original solution
# -*- coding: utf-8 -*-

# AtCoder Beginner Contest
# Problem B


def get_power(training_count):
    power = 1

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

    return power % (10 ** 9 + 7)


if __name__ == '__main__':
    training_count = int(eval(input()))

    print((get_power(training_count)))


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

# AtCoder Beginner Contest
# Problem B


if __name__ == '__main__':
    from math import factorial

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

# Optimized solution
def main():
    N = int(eval(input()))
    ans = 1
    for i in range(N):
        ans = (ans * (i+1)) % (10**9+7)
    print(ans)
    
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()))

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
import math
n = int(eval(input()))

power = math.factorial(n)

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


# Optimized solution
import math
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 *= i

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

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

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

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

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

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

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

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

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

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