CodeEff/ECCO huggingface dataset:
# Original 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()

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


def main():
    n = int(eval(input()))

    p = 1

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

    print(p)


if __name__ == '__main__':
    main()
# Original solution
# -*- coding: utf-8 -*-


def main():
    n = int(eval(input()))

    p = 1

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


if __name__ == '__main__':
    main()

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


# Optimized solution
import math
r = math.factorial(int(eval(input())))
print((r%((10**9)+7)))
# 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()))
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
def f(n):
  ans=1
  if n%2==1:
    a=2
    b=n//2+1
    c=n+2
  else:
    a=1
    b=n//2
    c=n+1
  for s in range(a,b+1):
    ans*=s*(c-s)
  ans=ans%(10**9+7)
  return ans
print((f(int(eval(input())))))

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

# input process
N = int(eval(input()))

# initialization
frac_num = 1
INF = 10**9 + 7

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

print((frac_num%INF))


# Optimized solution
# Problem B - Training Camp

# input process
N = int(eval(input()))

# initialization
frac_num = 1
INF = 10**9 + 7

for i in range(1, N+1):
    frac_num = (frac_num * i) % INF

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

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


# Optimized solution
import math

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

print((sunuke % 1000000007))


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

print(sunuke)
# Original solution
def main():
    n = int(eval(input()))

    power = 1

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

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


if __name__ == "__main__":

    main()


# Optimized solution
import math


def main():
    n = int(eval(input()))

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

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

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


if __name__ == "__main__":

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

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

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


# Optimized solution
x = int(input())
y = 1

for i in range(1, x + 1):
    y *= i
    if y > (10**9 + 7):
        y %= 10 ** 9 + 7

print(y)
# Original solution
import math

N = int(eval(input()))

num = math.factorial(N)

k, r = divmod(num, 10**9 + 7)
print(r)

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

FACTOR = 10 ** 9 + 7

num = 1
for i in range(1, N+1):
    num *= i
    k, r = divmod(num, FACTOR)
    num = r

print(r)
# Original solution
#-*- coding:utf-8 -*-

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

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

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

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

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

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

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

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

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

print(ans)

# Optimized solution
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)

MOD = 1000000007  # type: int


def solve(N: int):
    ans = 1
    for i in range(1, N+1):
        ans = (ans * i) % MOD

    print(ans)

    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

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

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

# Optimized solution
import sys

input = sys.stdin.readline

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

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

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

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

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


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

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

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

print((res%1000000007))

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

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

print(res)

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

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

print(n)
# 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
  if p%10==0:
    p=p%(10**9+7)
print((p%(10**9+7)))
# Original solution
import math
n=int(eval(input()))
print((math.factorial(n)%(10**9+7)))

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

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

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


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

# 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
N=int(eval(input()))
ans=1
while N>0:
    ans*=N%(10**9+7)
    N=N-1
print((ans%(10**9+7)))

# Optimized solution
N=int(eval(input()))
ans=1
for i in range(1,N+1):
    ans=(ans*i)%1000000007
print((ans%(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
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list([int(x)-1 for x in stdin.readline().split()])
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    n = II()
    ans = n * 800
    print((ans-(n//15)*200))
    return

#B
def B():
    n = II()
    print((math.factorial(n)%mod))
    return

#C
def C():

    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    B()


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

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

from math import factorial
div = int(1e9 + 7)
ans  = factorial(N) % div
print(ans)

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

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

for i in range(N + 1):
  if i == 0:
    continue

  p *= i

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

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

for i in range(N + 1):
  if i == 0:
    continue

  p *= i
  p %= C

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 *= i
    if power > (10**9+7):
        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
    ans=ans%(10**9+7)

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

# 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()))
ans=1

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

print(ans)


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

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

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

max_num = 10 ** 9 + 7

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



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

max_num = 10 ** 9 + 7

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

for i in range(1, N + 1) :
    power *= i 
    if power >= NUM :
        power %= NUM
print(power)
"""
power = math.factorial(N)

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

# Optimized solution
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    ans=1
    n=int(eval(input()))
    for i in range(2,n+1):
        ans=ans*i%MOD
    print(ans)
resolve()
# 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
mod = 10**9 + 7

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

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

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

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

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

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

power = math.factorial(n)
print((power%(10**9+7)))
# Original solution
import math
N = int(input().rstrip())
power = math.factorial(N)
print((power % (pow(10, 9) + 7)))

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

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

# Optimized solution
#ABC055

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

# Optimized solution
import math
print((math.factorial(int(eval(input())))%(7+10**9)))
# Original solution
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(eval(input()))
s = lambda: eval(input())

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


# Optimized solution
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(eval(input()))
s = lambda: eval(input())

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

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

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

n = int(s)

x = 1

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

answer = x % ((1000000000) + 7)

print(answer)

# Optimized solution
s = eval(input())

n = int(s)

x = 1

for num in range(n):
    x *= num + 1
    x = x % ((1000000000) + 7)



print(x)
# Original solution
n=int(eval(input()))
'''
import sys
sys.setrecursionlimit(1000000)
def kaijo(n):
    if n==0:
        return(1)
    else:
        n=n%(10**9+7)
        return(n*kaijo(n-1))
print(kaijo(n)%(10**9+7))
'''
ans=1
for i in range(1,n+1):
    ans*=i%(10**9+7)
print((ans%(10**9+7)))

# Optimized solution
n=int(eval(input()))
'''
import sys
sys.setrecursionlimit(1000000)
def kaijo(n):
    if n==0:
        return(1)
    else:
        n=n%(10**9+7)
        return(n*kaijo(n-1))
print(kaijo(n)%(10**9+7))
'''
ans=1
for i in range(1,n+1):
    ans=i*(ans%(10**9+7))
print((ans%(10**9+7)))
# Original solution
N = int(eval(input()))
n = 1
for i in range(1, N + 1):
    n *= i

a,b = divmod(n , 10**9 + 7)
print(b)   

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

# 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()))
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(2,n+1):
  ans=(ans*i)%(10**9+7)
  
print(ans)
# Original solution

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


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

a=1

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

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

# Optimized solution
import math

n = int(eval(input()))
a = math.factorial(n) % (10**9 + 7) 

print(a)
# Original solution
import math
n = int(eval(input()))

ans = math.factorial(n)  # nの階乗を計算

if ans >= (10 ** 9)+7:
    ans = ans % ((10 ** 9)+7)

print(ans)


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

ans = 1
for i in range(1, n+1):
    ans = ans * i
    ans = ans % ((10 ** 9)+7)  # 途中で割り算の余りを求めても、最終結果は同じになる

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

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
n=int(eval(input()))
a=1
for i in range(1,n+1):
	a=a*i
	
print((a%1000000007))

# Optimized solution
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
n=int(eval(input()))
a=1
for i in range(1,n+1):
	a=a*i%1000000007
	
print(a)
# Original solution
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
n=int(eval(input()))
a=1
for i in range(1,n+1):
	a=a*i%1000000007
	
print(a)
	

# Optimized solution
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
n=int(eval(input()))
a=1
big=1000000007
for i in range(1,n+1):
	a=a*i%big
	
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
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()))
tmp = 1
ans = 0
for i in range(1,n+1):
    tmp = tmp*i
print((tmp%(1000000000 + 7)))

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

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

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

p = 1

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

print(p)