CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))
ans = 1
for i in range(1,N+1):
    ans *= i
print((ans%(pow(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(N):
    power *= (i+1)

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



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

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

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

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

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

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

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

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

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

INF = 10**9 + 7

ans = [0] * (10**5 + 1)
ans[0] = 1

for i in range(1,10**5 + 1):
    ans[i] = ans[i-1] * i % INF

print((ans[n]))


# 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
from math import factorial
mod = 10 ** 9 + 7
n = int(eval(input()))

ans = factorial(n)
print((ans % mod))



# Optimized solution
mod = int(1e9+7)
n = int(eval(input()))

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

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

# Optimized solution
import sys

MOD = 10 ** 9 + 7
n = int(sys.stdin.readline().rstrip())

def main():
    res = 1
    for i in range(1, n+1):
        res *= i
        res %= MOD

    return res

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

P=1

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

A=P%(10**9+7)

print(A)

# 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)
# Original solution

n = int(eval(input()))


def func(times):
    power = 1
    divide_num = 10 ** 9 + 7

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

    print((power % divide_num))


func(times=n)


# Optimized solution

n = int(eval(input()))


def func(times):
    power = 1
    divide_num = 10 ** 9 + 7

    for i in range(times):
        power *= (i + 1)
        power %= divide_num

    print(power)


func(times=n)
# Original solution
N = int(eval(input()))
res = 1
temp = 1

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

for i in range(9):
    temp = temp * 10
temp = temp + 7


print((res % temp))


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

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

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

# Optimized solution
n = int(eval(input()))
from functools import reduce
print((reduce(lambda x,y:x*y%1000000007,list(range(1,n+1)))))
# Original solution
N = int(eval(input()))
P = 1
for i in range(N):
    P = P * (i+1)
print((P % 1000000007))

# Optimized solution
N = int(eval(input()))
P = 1
for i in range(N):
    P = (P * (i+1)) % 1000000007
print(P)
# Original solution
n=int(eval(input()))
k=0
ans=1

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

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

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


k=0
ans=1
w=10**9+7

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

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


# Optimized solution
N=int(eval(input()))
a=1
for b in range(a,N+1):
    a*=b
    if a>10**9+7:
        a=a%(10**9+7)
print(a)
# Original solution
import sys
a = sys.stdin.readline()
A = int(a)
P = 1
I = 1 
W = 10 ** 9 + 7
while I <= A:
    P *= I
    I += 1
P %= W
print(P)

# Optimized solution
import sys
a = sys.stdin.readline()
A = int(a)
P = 1
I = 1 
W = 10 ** 9 + 7
while I <= A:
    P *= I
    I += 1
    P %= W
print(P)
# 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 % 1000000007

print(power)
# 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
n = int(eval(input()))

mod = 10**9+7
ans = 1

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



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

# Optimized solution
INF = 10**9 + 7
n = int(eval(input()))
ans =1
while n != 0:
    ans = n*ans % INF
    n -= 1
print(ans)
# Original solution
n = int(eval(input()))
t = 1
mod = 10**9 + 7
for i in range(1, n + 1):
    t *= i
    #t = t % mod
print((t % mod))

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

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

N = int(eval(input()))

power = math.factorial(N)

print((power % 1000000007))



# Optimized solution
n=int(eval(input()))
ans=1
for i in range(n):
    ans=(ans*(i+1))%(10**9+7)
print(ans)
# Original solution
# ABC 055: B – Training Camp
from math import factorial

n = int(eval(input()))
power = 1

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

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

# Optimized solution
# ABC 055: B – Training Camp
from math import factorial

n = int(eval(input()))

print((factorial(n) % (10 ** 9 + 7)))
# Original solution
# ABC 055: B – Training Camp
from math import factorial

n = int(eval(input()))

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

# Optimized solution
# ABC 055: B – Training Camp
from math import factorial

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(n):
    p = p*(i+1)

print((p % (1000000000+7)))


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

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


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


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

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

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

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

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

ans = 1

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

print((ans % 1000000007))


# Optimized solution
#!/usr/bin/env python3
n = int(eval(input()))

ans = 1

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

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

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

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

# 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
num = int(eval(input()))
power = 1

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

# Optimized solution
import math
num = int(eval(input()))
power = math.factorial(num)

print((power % (pow(10,9) + 7)))
# Original solution
mod = 10**9 + 7

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

print((ans%mod))

# Optimized solution
mod = 10**9 + 7

n = int(eval(input()))
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 *= i
print((power % 1000000007))

# Optimized solution
import math

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

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

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

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

print((power%(1000000007)))


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

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

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

def modelAnswer():
   tmp=1
def main():
   N = int(eval(input()))
   print((myAnswer(N)))


if __name__ == '__main__':
   main()


# Optimized solution
from math import factorial
def myAnswer(N:int) ->int:
   ans =factorial(N)
   return ans % (10**9 + 7)

def modelAnswer():
   tmp=1
def main():
   N = int(eval(input()))
   print((myAnswer(N)))


if __name__ == '__main__':
   main()
# Original solution
from math import factorial
def myAnswer(N:int) ->int:
   ans =factorial(N)
   return ans % (10**9 + 7)

def modelAnswer():
   tmp=1
def main():
   N = int(eval(input()))
   print((myAnswer(N)))


if __name__ == '__main__':
   main()

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


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

# Optimized solution
import math

n = int(eval(input()))

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

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

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

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

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

# N!を(10^9+7)で割った余りを求める
# N!そのものを求める必要はなく、
# x = i*x (mod 10^9+7) と更新していけばよい
M = 10**9 + 7
s = 1
for i in range(1, N+1):
  s *= i
  s %= M
  
print(s)
# Original solution
n = int(eval(input()))

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

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


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

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

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

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

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

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


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


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

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

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

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

if __name__=="__main__":
    main()

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

import math

def main():
    n = int(eval(input()))
    ans =math.factorial(n)
    print((ans%1000000007))

if __name__=="__main__":
    main()
# Original solution
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

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

if __name__=="__main__":
    main()

# Optimized solution
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

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

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


# Optimized solution
X=10**9+7

def A(c,d):
    return c*d%X

a=int(eval(input()))
x=1
for i in range(1,a+1):
    x = A(x,i)

print(x)
# Original solution
X=10**9+7

def A(c,d):
    return c*d%X

a=int(eval(input()))
x=1
for i in range(1,a+1):
    x = A(x,i)

print(x)


# Optimized solution
X=10**9+7


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

print((x%X))


# Optimized solution
S=10**9+7
a=int(eval(input()))
x=1
for i in range(1,a+1):
    x = x* i % S
print(x)
# Original solution
from functools import reduce

N = int(eval(input()))
div = pow(10, 9) + 7
print((reduce(lambda ans, n: ans * n % div, list(range(1, N + 1)))))

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

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 = ans % (10**9+7)
print(ans)
# Original solution
import sys
from math import factorial

MOD = 10**9 + 7

def solve():
    N = int(input())
    ans = factorial(N) % MOD
    print(ans)
    
def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None


if __name__ == '__main__':
    solve()


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


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

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

result = 1
for index in range(1, number + 1):
  result = result * index


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

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

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

print((res % M))

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

res = 1
for i in range(1, N + 1):
    res *= i
    res = res % M

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

# Optimized solution
N = int(eval(input()))
val = 1
for i in range(1, N+1):
    val *= i
    if val > 10**9 + 7:
        val = val%(10**9 + 7)
print(val)
# 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
num = int(eval(input()))
j = 1
div = pow(10,9)+7
for i in range(num):
    j = (i+1)*j
print((j%div))

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

#div = pow(10,9)+7
print((math.factorial(num)%(pow(10,9)+7)))
# Original solution
import functools
import operator
N = int(eval(input()))
prod = functools.partial(functools.reduce,operator.mul)
print((prod(list(range(1,N+1)))%(10**9+7)))

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

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

# Optimized solution
import math
print((math.factorial(int(eval(input())))%(10**9+7)))
# Original solution
x = int(eval(input()))
val = 1
for index in range(1,x+1):
    val = val*index
print((val %(10**9 + 7)))

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

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

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

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

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


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


if __name__ == "__main__":
    main()


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


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

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

n = int(eval(input()))

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

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

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


def main():
    n = int(eval(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()