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-----
3

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

Solutions:
N = int(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)

MOD=1000000007

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


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

N = int(input())

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


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

N = int(input())

p = 1

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

print(p)

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

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


a=int(input())
b=1
for i in range(1,a+1):
  b=b*i
  if b>1000000007:
    b=b%1000000007
if b<1000000000:
  print(b)
else:
  print((b%1000000007))


N = int(input())

mod = 10 ** 9 + 7
ans = 1

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

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

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

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

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

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

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

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

import math


def answer(n: int) -> int:
    return math.factorial(n) % (10 ** 9 + 7)


def main():
    n = int(input())
    print((answer(n)))

def __starting_point():
    main()

__starting_point()

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

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

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


N = int(input())

power = 1

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

print(power)

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

a=int(input())
import math

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

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

n = int(input())

ret = 1

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

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

N = int(input())

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

n=int(input())
x=1
for i in range(n):
  x*=(n-i)
  if x>10**9+7:
    y=x//(10**9+7)
    x-=y*(10**9+7)

print(x)

# -*- coding: utf-8 -*-

N = int(input())

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

print(ans)

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

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

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

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

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

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

def __starting_point():
    main()
__starting_point()

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

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

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())
n = I()
ans = 1
for i in range(n):
    ans *= (i+1)
    ans %= mod
print((ans%mod))


from functools import reduce
MOD = 1_000_000_007
print((reduce(lambda a,b: a*b%MOD, list(range(1, int(input())+1)))))


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

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from math import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
# mod = 9982443453
# mod = 998244353
INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())
n = I()
power = 1
for i in range(n):
    power = (power * (i+1)) % mod
    power %= mod
print(power)


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


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

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

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

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

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


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

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

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

print(res)

n = int(input())
mod = 1000000007
su = 1
for i in range(1,n+1):
    su = ((su%mod)*(i%mod))%mod
print(su%mod)

import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10**9)
MOD = 10**9 + 7
#MOD = 998244353


def si(): return input()
def ii(): return int(input())
def fi(): return float(input())
def lstr(): return input().split()
def lint(): return list(map(int, input().split()))
def lint_dec(): return list(map(lambda x:int(x) - 1, input().split()))
def lnstr(n): return [input() for _ in range(n)]
def lnint(n): return [int(input()) for _ in range(n)]
def lint_list(n): return [lint() for _ in range(n)]



############################################################
N = ii()
ans = 1

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

print(ans)

import re
import copy

def accept_input():
    N = input()
    return int(N)

N = accept_input()

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


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

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

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

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

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


import math

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


MOD = pow(10,9)+7
def MODINV(n:int, MOD=MOD):
    return pow(n, MOD-2, MOD)

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

def __starting_point():
    main()

__starting_point()

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

import math
print(math.factorial(N)%mod)

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

from functools import reduce
MOD = 1_000_000_007
print((reduce(lambda a,b: a*b%MOD, list(range(1, int(input())+1)), 1)))


N = int(input())

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

print(power%K)

import math

N = int(input())

p = 1
for i in range(2, N+1):
  p *= i
  p = p % (1000000000 + 7)
  
print(p)


import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


MOD = 10 ** 9 + 7


def solve():
    n = ini()
    p = 1
    for i in range(1, n + 1):
        p *= i
        p %= MOD
    return p


print(solve())


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

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


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

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

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

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

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

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

print(res)


N = int(input())

a =1
div = 10**9 +7

for n in range(1,N+1):
  a *= n
  if a>div :
    a = a%div

print(a)

import sys
from math import factorial
n=int(sys.stdin.readline())
print(factorial(n)%(10**9+7))

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

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

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

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

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

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

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

print(calc)


N = int(input())
ans = 1
mod = 1000000007

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

print(ans)

import math

N = int(input())

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


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

n = int(input())
#a, b = map(int,input().split())
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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


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

from math import *
print(factorial(int(input())) % (10**9 + 7))

N = int(input())

mod = 10 ** 9 + 7

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

print(power)


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


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

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

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

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


N = int(input())

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

import math

N = int(input())

print((math.factorial(N) % (1000000000 + 7)))


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

print(ans)

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

import math

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