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

power = 1

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

print((power % P))

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

power = 1

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

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

s = 1

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

# Optimized solution
n = int(eval(input()))
 
s = 1
 
for i in range(n):
  s = (s * (i+1)) % 1000000007
print((s%1000000007))
# Original solution
from collections import defaultdict
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()


# Optimized solution
from collections import defaultdict

MOD = 10 ** 9 + 7


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


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


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

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

# Optimized solution
def factorialMod(n, modulus):
    ans=1
    if n <= modulus//2:
        #calculate the factorial normally (right argument of range() is exclusive)
        for i in range(1,n+1):
            ans = (ans * i) % modulus
    else:
        #Fancypants method for large n
        for i in range(n+1,modulus):
            ans = (ans * i) % modulus
        ans = modinv(ans, modulus)
        ans = -1*ans + modulus
    return ans % modulus


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

power = 1
for n_i in range(1, n+1):
    power *= n_i
print((power%1000000007))

# Optimized solution
import math

n = int(eval(input()))

print((math.factorial(n)%1000000007))
# 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)
    p = p % (10 ** 9 + 7)

print(p)  # べき乗の書き方
# Original solution
sum_num = 1
for i in range(1, int(eval(input())) + 1):
    sum_num *= (i % (10**9 + 7))
print((sum_num % (10**9 + 7)))

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



# Optimized solution
m = 1
for i in range(1,int(eval(input()))+1):
    m = m * i % 1000000007
print(m)
# Original solution
n=int(eval(input()))
p=1
if n<=1000:
    for i in range(1,n+1):
        p*=i
    print((p%(10**9+7)))
else:
    p=641419708
    for i in range(1001,n+1):
        p*=i
    print((p%(10**9+7)))


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

i = 1
power = 1
while i <= n:
    power *= i
    i += 1
print((power % (10**9 + 7)))


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

i = 1
power = 1
while i <= n:
    if power >= 10**9 + 7:
        power %= (10**9 + 7)
    power *= i
    i += 1
print((power % (10**9 + 7)))
# Original solution
n = int(eval(input()))
p,mod = 1,1000000007
for i in range(1,n+1):
    p = p*i
print((p%mod))


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


if __name__ == '__main__':
    main()


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


if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
mod = 10**9 + 7
power = 1
for i in range(1, N+1):
    power *= i
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)
# Original solution
import math
print((math.factorial(int(eval(input())))%(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
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()))
#N = 10**5
p = 1
#x = [p*i for i in range(1,N+1)]
for i in range(1,N+1):
  p =i*p%(10**9+7)
#  print(p)
  
  
  
print(p)
# Original solution
N = int(eval(input())) + 1
power = 1
for i in range(1,N):
    power*=i

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


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

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

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

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

print((p % div))
# Original solution
from math import factorial

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

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

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


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

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

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

# Optimized solution
N = int(eval(input()))
P = 1
for n in range(1,N + 1):
    P = (P * n) % ((10**9)+7)
print(P)
# Original solution
a=int(eval(input()))
p=1
b=a-1
while b>1:
    a=a*b
    b-=1
p=a%(10**9+7)
print(p)

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

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

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

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

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

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

# Optimized solution
N = int(eval(input()))
a=1
for i in range(1,N+1):
    a*=i
    a%=(10**9+7)
print((a%(10**9+7)))
# 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
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

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

# Optimized solution
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

INF = 10**9+7
N = II()
pow = 1
for i in range(1, N+1):
    pow = pow*i%INF
print(pow)
# Original solution
#!/usr/bin/env pypy3

import math
print((math.factorial(int(eval(input()))) % 1000000007))

# Optimized solution
n = int(eval(input()))
for i in range(n - 1, 1, -1):
	n *= i
	n %= 10**9 + 7
print(n)
# 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
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

def main():
    n = inp()
    res = 1
    for i in range(1,n+1):
        res *= i%mod
    print((res%mod)) 
if __name__ == '__main__':
    main()

# Optimized solution
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

total = 1

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

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


# Optimized solution
import math

n = int(eval(input()))

f = math.factorial(n)

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

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

# Optimized solution
import math

n = int(eval(input()))

print((int(math.factorial(n)) % (10**9+7)))
# Original solution
import functools
n = int(eval(input()))
p = functools.reduce(lambda x,y: x * y, list(range(1, n+1))) % (10**9 + 7)
print(p)


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

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

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

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


if __name__ == "__main__":
    N = int(eval(input()))
    print((factorial(N)))
# 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 %= 1000000007
print(p)
# Original solution
n = int(eval(input()))
power = 1

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

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

ans = 1


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

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

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

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

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

print(ans)

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

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

print(res)


# Optimized solution
n = int(eval(input()))
res = 1
for i in range(0,n):
    res *= (i+1)
    if res > 10**9+7:
        res = res % (10**9+7)
print(res)
# Original solution
n = int(eval(input()))
a = 1
for i in range(1, n+1):
      a *= i
print((a%(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
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

# Optimized solution
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(eval(input()))

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

# Optimized solution
import math
print((math.factorial(int(eval(input())))%(10**9 + 7)))
# Original solution
# ABC0555 - B - Training Camp

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)


# Optimized solution
# ABC0555 - B - Training Camp

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
import math

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

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

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

print((power%1000000007))

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

import math

N = eval(input())
power = 1
for i in range(N):
    power = math.fmod(power*(i+1),1000000007)

print((int(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 = power*i

print((power%1000000007))

# 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()))

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

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


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

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

print(x)
# Original solution
def main():
    import sys
    input = sys.stdin.readline
    N = int(eval(input()))
    ans=1
    for i in range(1,N+1):
        ans *= i
    print((ans%(10**9+7)))

if __name__ == '__main__':
    main()

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

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

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

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

# Optimized solution
N=int(eval(input()))
c=1
for i in range(N):
  c *= i+1
  c = c % (10**9+7) # ここで、掛け算のスケールを減らすのか！

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

# Optimized solution
n = int(eval(input()))
DIV=10**9+7
s=1
for i in range(1,n+1):
    s=(s*i)%int(DIV)
print(s)
# Original solution
#coding: utf-8

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

# Optimized solution
#coding: utf-8

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

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

divisor = (10 ** 9) + 7

N = int(eval(input()))

print((factorial_power(N) % divisor))

# Optimized solution
def factorial_power(n):
    power = 1
    
    for i in range(1, n+1):
        power *= i
        power = power % divisor
    return power

divisor = (10 ** 9) + 7

N = int(eval(input()))

print((factorial_power(N)))
# 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
import math

N=int(eval(input()))

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

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

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


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

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


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

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

x = int(eval(input()))
power = 1
for i in range(1, x+1):
    power *= i
   # print(power)

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


# Optimized solution

import math
#import itertools
#import statistics
#import numpy as np
#import collections
n = int(eval(input()))
#k, s = list(map(int, input().split()))
#a = list(map(int, input().split()))
print((math.factorial(n)%(pow(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 % (10 ** 9 + 7)))