Problem:
 Score : 200 points    Problem Statement Snuke loves working out. He is now exercising N times.  Before he starts exercising, his power is 1 . After he exercises for the i -th time, his power gets multiplied by i .  Find Snuke's power after he exercises N times. Since the answer can be extremely large, print the answer modulo 10^{9}+7 .      Constraints  1 ≤ N ≤ 10^{5}         Input The input is given from Standard Input in the following format:  N       Output Print the answer modulo 10^{9}+7 .        Sample Input 1 3      Sample Output 1 6   After Snuke exercises for the first time, his power gets multiplied by 1 and becomes 1 .  After Snuke exercises for the second time, his power gets multiplied by 2 and becomes 2 .  After Snuke exercises for the third time, his power gets multiplied by 3 and becomes 6 .        Sample Input 2 10      Sample Output 2 3628800       Sample Input 3 100000      Sample Output 3 457992974  Print the answer modulo 10^{9}+7 .

Solution (Python):
N = int(input())

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

Solution (Python):
import math

a=int(input())
b=math.factorial(a)
c=b%((10**9)+7)
print(c)

Solution (Python):
import math
print(math.factorial(int(input())) % 1000000007)

Solution (Python):
n=int(input())
ans=1
for i in range(1,n+1):
      ans=(ans*i)%1000000007
print(ans)

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

print(ans)

Solution (Python):
import math
print(math.factorial(int(input()))%1000000007)

Solution (Python):
import math
print(math.factorial(int(input()))%1000000007)

Solution (Python):
mod = 10**9+7
ans = 1
for i in range(int(input())):
    ans *= i+1
    ans %= mod
print(ans)

Solution (Python):
n = int(input())
fact = 1
for i in range(1,n+1):
  fact = fact * i % (10**9 +7)
res = fact % (10**9 + 7)
print(res)

Solution (Python):
import math

n = int(input())

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

Solution (Python):
M = 1000000007
n=int(input())
f = 1
for i in range(1, n + 1):  
    f = (f * i) % M 
print(f)

Solution (Python):
n=int(input())
import math
print(math.factorial(n)%1000000007)

'''
p,m=map(int,input().split())
s=bin(p)
s=s[2:]
n=len(s)


ans=pow(2,n) -1
if(m>=2):
    print(ans)
else:
    print(p)


m,n=map(int,input().split())
a=[False]*(n+1)
a[0]=True
for i in range(m):
    temp=list(map(int,input().split()))
    for kk in temp[1:]:
        a[kk]=True
ans=True
for nn in a:
    ans = nn and ans
if(ans):
    print("YES")
else:
    print("NO")



y,b,r = map(int,input().split())

if(r>b):
    if(b>y):
        print(int((3*y)+3))
    else:
        print(int(3*b))
else:
    if(b<y):
        print(int((3*y)-3))
    else:
        print()


  '''

Solution (Python):
import math
n=int(input())
ans=math.factorial(n)%1000000007
print(ans)

Solution (Python):
import math
n=int(input())
i=math.factorial(n)
print(i%(10**9+7))

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
N=int(input())
 
a=1
 
for i in range(N):
  a*=(i+1)
  a%=1000000007
 
print(a)

Solution (Python):
import math
i=int(input())
print(math.factorial(i)%(10**9+7))

Solution (Python):










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

print(power)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):


def main():
    
    
    
    

    N = int(input())
    res = 1
    for i in range(1, N+1):
        res = i * res % 1000000007
    print(res)




if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
ans = 1
mod = 10**9+7
for i in range(1,n+1):
    ans *= i
    ans %= mod

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
n=int(input())
ans=1
mod=10**9+7
for i in range(1,n+1):
    ans*=i
    ans%=mod
print(ans)

Solution (Python):
power=1
n=int(input())
mod=10**9+7
for i in range(1,n+1):
    power*=i
    power%=mod
    
print(power)

Solution (Python):
N = int(input())
MOD = 10 ** 9 + 7

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

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
def TrainingCamp():
    mod = 10 ** 9 + 7
    N = int(input())
    power = 1
    for i in range(1, N + 1):
        power *= i
        power %= mod
    print(power)

TrainingCamp()

Solution (Python):
N=int(input())
p = 1
C = 10**9+7

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

  p *= i
  p %= C

print(p)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
mod = 7 + 10 ** 9
ans = 1
while N > 1:
    ans *= N
    ans %= mod
    N -= 1
print(ans)

Solution (Python):
n = int(input())

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

print(x)

Solution (Python):
N = int(input())

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

print(power)

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

Solution (Python):
N = int(input())
result = 1

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

Solution (Python):
import math
x = int(input())
i=math.factorial(x)
print(i%(10**9+7))

Solution (Python):


import numpy as np
import math
MOD=10**9+7

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

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

Solution (Python):
N = int(input())
result = 1
x = 10 ** 9 + 7
for n in range(2, N + 1):
    result *= n
    result %= x
print(result)

Solution (Python):
n = int(input())

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

Solution (Python):
n = int(input().strip())

ans = 1

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

Solution (Python):
import math
print(math.factorial(int(input())) % (10**9+7))

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

Solution (Python):
n = int(input())

p = 1

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

Solution (Python):
n=int(input())
mod=10**9+7
ans=1
for i in range(1,n+1):
  ans=ans*i
  if ans>mod:
    ans=ans%mod
print(ans)

Solution (Python):
n = int(input())

mod_n = 10**9+7
ans = 1

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

Solution (Python):
n = int(input())
power = 1

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

print(power)

Solution (Python):
N = int(input())


def factorial(N):
    f = [1] * (N+1)
    mod = 10 ** 9 + 7
    for i in range(1, N+1):
        f[i] = i * f[i - 1] % mod
    return f[-1]


print(factorial(N))

Solution (Python):
n = int(input())
mod = 10**9 + 7
ans = 1
for i in range(1,n+1):
  ans = ans * i % mod
print(ans)

Solution (Python):
import math

N = int(input())

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

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
  ans = ans * i
  ans = ans % 1000000007
 
print(ans)

Solution (Python):


n = int(input())

mod = 10**9+7

s = 1

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

print(s)

Solution (Python):
i = int(input())
x = 1000000007
ans = 1

for j in range(1, i + 1):
    ans = ((ans * j) % x)
print(ans)

Solution (Python):
import math

N = int(input())
P = math.factorial(N)%1000000007
print(P)

Solution (Python):
n=int(input())
ans=1
for i in range(1,n+1):
    ans=((ans*i)%(1000000000+7))
print(ans)

Solution (Python):

import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
n = int(input())
power = 1
for i in range(1, n+1):
    power *= i
    power %= 1000000007

print(power)

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
import math
N = int(input())
print((math.factorial(N)) % (10**9+7))

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
N=int(input())
ans=1

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

Solution (Python):
n = int(input())
mod = 10**9+7
ans = 1
for i in range(1,n+1):
  ans = i * ans%mod
print(ans)

Solution (Python):
import math

n = int(input())

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

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
n=int(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)

Solution (Python):
n = int(input())



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

print(ans)

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

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):

 
import math
import itertools
import sys
import copy
 


N = int(input())


p = (10 ** 9) + 7

print (math.factorial(N) % p)

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
n=int(input())
mod=10**9+7
power=1
for i in range(1,n+1):
  power=power*i%mod
print(power)

Solution (Python):
n = int(input())
INF = 10**9 + 7
x = 1

def modmulti(a, b):
  return a * b % INF

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

print(x)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
n = int(input())

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

print(power)

Solution (Python):

import math
N = int(input())
MODBY = 7 + 10**9

print(math.factorial(N)%MODBY)

Solution (Python):
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(input())
    print(factorial(n))

Solution (Python):
import math
N = int(input())

ans = math.factorial(N) % 1000000007
print(ans)

Solution (Python):
N = int(input())
mod = 10**9+7
ans = 1
for i in range(1, N+1):
    ans *= i
    ans %= mod
print(ans)

Solution (Python):
N = int(input())
mod = 10 ** 9 + 7
answer = 1
for i in range(2, N+1):
    answer *= i
    answer %= mod

print(answer)

Solution (Python):
from math import factorial

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

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

Solution (Python):

n = int(input())
ans = 1

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

print(ans)

Solution (Python):
import math
print(math.factorial(int(input())) % (10**9 + 7))

Solution (Python):
N=int(input())

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

Solution (Python):
from fractions import gcd

from heapq import*
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7



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


if __name__ == '__main__':
    main()

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

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
n = int(input())
ans = 1
for i in range(n):
    ans *= i + 1
    ans %= 10 ** 9 + 7
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
N=int(input().rstrip())
ans=1
inf=1000000000+7
for i in range(1,N+1,1):
    ans=(ans % inf) *(i % inf)
print(ans%inf)

Solution (Python):
import math

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

Solution (Python):
import math
n = int(input())
print( math.factorial(n)%(10**9+7) )

Solution (Python):
import math
N=int(input())
print(math.factorial(N)%(pow(10,9)+7))

Solution (Python):
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)

Solution (Python):
N = int(input())
MOD = 10 ** 9 + 7

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

Solution (Python):
n = int(input())
modulo = 10 ** 9 + 7
num = 1
for i in range(1, n+1):
    num = (num * i) % modulo
print(num)

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

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
N=int(input())
import math
print(math.factorial(N)%(10**9+7))

Solution (Python):
a=1
for i in range(1,int(input())+1):
  a=a*i % (10**9+7)
print(a)

Solution (Python):
n = int(input())
ans = 1
for i in range(1,n+1):
  ans = ans * i % 1000000007
print(ans)

Solution (Python):
import math

n = int(input())
m = 10**9 + 7


print(math.factorial(n) % m)

Solution (Python):
n = int(input())
ans = 1
for i in range(n):
    ans *= (i + 1)
    ans %= (10 ** 9 + 7)
print(ans)

Solution (Python):
p = 1
for i in range(int(input())):
    p = ((i + 1)*p) % (10**9 + 7)
print(p)

Solution (Python):
MOD = 10 ** 9 + 7

N = int(input())

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

print(res)

Solution (Python):
import math
n = int(input())
fact = math.factorial(n)
mod = 10**9 + 7
ans = fact % mod
print(ans)

Solution (Python):

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

Solution (Python):
import math
 
n = int(input())
 
m = 10 ** 9 + 7
 
print(math.factorial(n) % m)

Solution (Python):
N=int(input())
mod=10**9+7
bikkuri=[1 for i in range(N+2)]
for i in range(N+1):
  bikkuri[i+1]=((i+1)*bikkuri[i])%mod
print(bikkuri[N])

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

Solution (Python):
n=int(input())
mod=10**9+7
now=1
for i in range(1,n+1):
    now*=i
    now%=mod
print(now)

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
import math

N = int(input())

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

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10**9 + 7))

Solution (Python):
import math

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

Solution (Python):
n = int(input())
mod = 10 ** 9 + 7
def a(n):
    s = 1
    for i in range(1, n + 1):
        s = (s * i) % mod
    return s

print(a(n))

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10**9 + 7))

Solution (Python):
import math
print( math.factorial( int( input() ) )%(10**9+7) )

Solution (Python):
n = int(input())
mod = 10**9 + 7
ans = 1
for i in range(1,n + 1):
  ans = i * ans % mod
print(ans)

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

Solution (Python):
N = int(input())
p = 1

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

print(p)

Solution (Python):
n = int(input())

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

Solution (Python):
N = int(input())

devide = 10 ** 9 + 7

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


print(power)

Solution (Python):

"""
def kaijo(n):
  if n ==1:
    return n
  return n * kaijo(n-1)
"""

import math

n = int(input())

print(math.factorial(n)%1000000007)

Solution (Python):
n=int(input())
ans=1

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

Solution (Python):
n = int(input())
ans = 1
def kaijo(num):
    global ans
    ans *= num

for i in range(n,0,-1):
    kaijo(i)
    ans %= 1000000007

print(ans)

Solution (Python):
N=int(input())
ans=1
DIV=10**9+7
while N>1:
  ans=(ans*(N%DIV))%DIV
  N-=1
print(ans)

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())

p = 1

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

print(p)

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

Solution (Python):
N=int(input())
n=1
while N!=1:
  n*=N
  n=n%(10**9+7)
  N-=1
print(n)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    N = int(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()

Solution (Python):
import math
N = int(input())
print(math.factorial(N) % (10**9 + 7))

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

Solution (Python):
N=int(input())
x=1 

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

print(x)

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    print(factorial(int(input())) % mod)
if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = 1
mod = 10 ** 9 + 7
for i in range(1,n+1):
  ans = (ans * i) % mod
print(ans)

Solution (Python):
ans = 1
mod = 10**9+7
for i in range(1,int(input())+1):
	ans = ans*i%mod
print(ans)

Solution (Python):
import math


def main():
    N = int(input())
    p = 10**9 + 7
    j = math.factorial(N)

    print(j % p)


main()

Solution (Python):
N = int(input())
P = 1
M = 10**9+7
for i in range(N):
  P = ( P * ( (i + 1) % M ) ) % M
print(P)

Solution (Python):
n = int(input())

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

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

Solution (Python):
N = int(input())

power = 1
for n in range(1, N+1):
    power = (power*n) % int(1e9+7)

print(power)

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

Solution (Python):
import math
print(math.factorial(int(input())) % (10**9 + 7))

Solution (Python):
N = int(input())
mod = 1000000007
ans = 1
for i in range(1,N+1):
    ans = (i * ans)%mod
print(ans)

Solution (Python):
N=int(input())
result=1

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

print(result%1000000007)

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
n = int(input())


import math
k = math.factorial(n)

print(k%1000000007)

Solution (Python):

line = int(input())

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

Solution (Python):
N = int(input())
ans = 1
P = 10**9+7
for i in range(1, N+1):
    ans = ans * i % P
print(ans)

Solution (Python):
n = int(input())
import math
x = math.factorial(n)
print(x % (10 ** 9 + 7))

Solution (Python):
power = 1
x = int(input())
for a in range(1, x + 1):
  power = (power * a) % (10**9 + 7)

print(power)

Solution (Python):
from math import factorial as fc
a = int(input())
print(fc(a)%(10**9+7))

Solution (Python):
N = int(input())
ans = 1
mod = 10**9 + 7
for i in range(1,N+1):
    ans = ans*i%mod
print(ans)

Solution (Python):
N = int(input())

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

print(p % div)

Solution (Python):

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

Solution (Python):
n=int(input())
ans=1
for i in range(1,n+1):
  ans*=i
  if ans>10**9+7:
      ans=ans%(10**9+7)
print(ans%(10**9+7))

Solution (Python):
import math
n=int(input())
print((math.factorial(n))%(10**9+7))

Solution (Python):
n=int(input())
import math 
print(math.factorial(n)%((10**9)+7))

Solution (Python):
N = int(input())
power = 1

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

print(power)

Solution (Python):
import math

n=int(input())

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

Solution (Python):
import math
n = int(input())
d = 10**9 + 7
print(math.factorial(n)%d)

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

Solution (Python):
def examB(mod):
    N = I()
    cur = 1
    for i in range(1,N+1):
        cur = (cur*i)%mod
    print(cur)


import sys
import copy
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB(mod)

Solution (Python):

from math import factorial

n = int(input())
power = 1

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

print(power)

Solution (Python):

from math import factorial

n = int(input())

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

Solution (Python):
A = int(input())
b = 1
mod = 1000000007
for a in range(1,A+1):
  b = b*a % mod
print(b)

Solution (Python):
n = int(input())
power = 1

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

print(power)

Solution (Python):
sup = int(input())

INF = 10 ** 9 + 7 

pow = 1

for i in range(1,sup + 1):
  pow = pow * i % INF
  
print(pow)

Solution (Python):
import math
N=int(input())
L=math.factorial(N)
print(L%(10**9+7))

Solution (Python):
from math import factorial as f
print(f(int(input())) % (10 ** 9 + 7))

Solution (Python):
import math
N= int(input())
print(math.factorial(N)%(10**9+7))

Solution (Python):
n = int(input())
ans = 1
mod = 10**9 + 7

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

Solution (Python):
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()

Solution (Python):
n = int(input())
puwer = 1
answer = 10**9 + 7
for i in range(1, n+1):
    puwer = (puwer * i) % answer
print(puwer)

Solution (Python):
n = int(input())
p = 1
q = 10**9+7
for i in range(1, n+1):
    p = (p*i) % q

print(p)

Solution (Python):
n = int(input())
ans = 1
for i in range(2, n+1):
    ans = ans * i % (10**9 + 7)
print(ans)

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

Solution (Python):
import math
a = int(input())
print(math.factorial(a)%(10**9+7))

Solution (Python):
num = 1
for i in range(1, int(input()) + 1):
  num = (num * i) % (10**9 + 7)
print(num)

Solution (Python):
power = 1
n = int(input())
tmp = 10 ** 9 + 7

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

print(power)

Solution (Python):
a = 1
for i in range(1,int(input())+1):
    a = (a*i)%(10**9+7)
print(a)

Solution (Python):
import math

n = int(input())
ans = math.factorial(n) % (pow(10, 9) + 7)
print(ans)

Solution (Python):
import math
n = int(input())

m = 10 ** 9 + 7

print(math.factorial(n) % m)

Solution (Python):
from math import factorial
N = int(input())
print(factorial(N)%(10**9+7))

Solution (Python):
mod = 10**9 + 7

def modFact(n):
    fact = 1
    for i in range(1,n+1):
        fact = (fact % mod * i % mod) % mod
    return fact 

n = int(input())
print(modFact(n))

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
  ans *= i
  ans %= 1000000007
print(ans)

Solution (Python):
n=int(input())

i=1

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

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

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
n = int(input())

power = 1
for i in range(1, n + 1):
    power *= i
    if(power > 1e9 + 7):
        power %= 1e9 + 7

print(int(power))

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9 + 7))

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9 + 7))

Solution (Python):
N=int(input())

pow = 1

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

print(pow)

Solution (Python):
n = int(input())
p = 1
for i in range(2,n+1):
    p = (p*i)%1000000007
print(p)

Solution (Python):
ans=1
for i in range(1,int(input())+1):
    ans=(ans*i)%(10**9+7)
print(ans)

Solution (Python):
n = int(input())
ans = 1
mod = 7 + 10 ** 9
for i in range(1,n+1):
    ans *= i
    ans %= mod
print(ans % mod)

Solution (Python):
n=int(input())
count=1
for i in range(1,n+1):
  count=count*i%(10**9+7)
print(count)

Solution (Python):

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

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
mod = int(1e9+7)
n = int(input())

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

Solution (Python):
from math import factorial
mod = 10 ** 9 + 7
n = int(input())

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

Solution (Python):
from math import factorial
mod = int(1e9+7)
n = int(input())

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

Solution (Python):
n=int(input())

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

Solution (Python):
import math
n = int(input())
ans = math.factorial(n)

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

Solution (Python):
n=int(input())
p=1
for c in range(1,n+1):
    p=(p*c)%(10**9+7)
print(p)

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

Solution (Python):
n=int(input())
ans=1
for i in range(1, n+1):
    ans*=i
    if ans > 10**9+7:
        ans=ans%(10**9+7)
print(ans)

Solution (Python):
INFTY = 10**9 + 7
N = int(input())
p = 1
for i in range(2,N+1):
    p = (p*i)%INFTY
print(p)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
import math
n = int(input())

n = math.factorial(n)

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

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

Solution (Python):
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(input())
    print(factorial(N))

Solution (Python):






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

print(ans)

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

Solution (Python):

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

Solution (Python):
n = int(input())
power = 1
for i in range(n):
    power = power * (i + 1)
    if power >= 10 ** 4:
        power = power % (10 ** 9 + 7)

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

Solution (Python):
N=int(input())
MOD=10**9+7
ans=1
for i in range(1,N+1):
    ans=ans*i%MOD
print(ans)

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

Solution (Python):
def main():
    n = int(input())

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


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
P = 1

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

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N + 1):
    ans = ans * i
    ans = ans % 1000000007
print(ans)

Solution (Python):
n = int(input())

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

Solution (Python):
n=int(input())
MOD=10**9+7 
from math import factorial as f 
print(f(n)%MOD)

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

Solution (Python):
import math
N=int(input())
ans=math.factorial(N)
print(ans%(10**9 +7))

Solution (Python):
n = int(input())
pi = 1
for i in range(1, n + 1):
    pi = (pi * i) % 1000000007
print(pi)

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

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

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

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

Solution (Python):
n=int(input())
count=1
for i in range(1,n+1):
  count*=i
  count%=(10**9+7)
print(count)

Solution (Python):
n = int(input())
MOD = 10**9 + 7

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

print(ans)

Solution (Python):
import math
print(math.factorial(int(input())) % 1000000007)

Solution (Python):
n=int(input())
import math
print(math.factorial(n) % (10**9+7))

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

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

Solution (Python):
n=int(input())
ans=1
for i in range(1,n+1):
  ans*=i
  ans%=1000000007
print(ans)

Solution (Python):
import math

mod = 1000000007

n = int(input())

print(math.factorial(n) % mod)

Solution (Python):
n = int(input())
ans = 1
mod = 10 ** 9 + 7
for i in range(1, n + 1):
    ans = (ans * i % mod)
print(ans % mod)

Solution (Python):
N = int(input())

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

print(result)

Solution (Python):
import math
n=int(input())
print(math.factorial(n)%((10**9)+7))

Solution (Python):
import math

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

Solution (Python):
n = int(input())

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

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

Solution (Python):
n=int(input())
mod=10**9+7
ans=1
for i in range(1,1+n):
    ans*=i
    ans=ans%mod
print(ans)

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

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

Solution (Python):
n=int(input())
ans=list()
ans.append(1)
for i in range(1,n):
    ans.append(ans[i-1]*(i+1)%(pow(10,9)+7))
print(ans[n-1])

Solution (Python):
ans=1
mod = 10**9+7
for i in range(int(input())):
  ans *= i+1
  ans = ans%mod
print(ans)