output_description: Print the answer modulo 10^{9}+7.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
attempt: #
  # 　　  ⋀_⋀
  # 　　  (･ω･)
  # .／ Ｕ ∽ Ｕ＼
  #  │＊　合　＊│
  #  │＊　格　＊│
  #  │＊　祈　＊│
  #  │＊　願　＊│
  #  │＊　　　＊│
  #      ￣
  #
  import sys
  
  sys.setrecursionlimit(10**6)
  input = sys.stdin.readline
  from math import floor, ceil, sqrt, factorial, log  # log2ないｙｐ
  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()
  
problem_description: 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.
samples: [{"input": "3", "output": "6\n    \n\n  * After Snuke exercises for the first time, his power gets multiplied by 1 and becomes 1.\n  * After Snuke exercises for the second time, his power gets multiplied by 2 and becomes 2.\n  * After Snuke exercises for the third time, his power gets multiplied by 3 and becomes 6.\n\n* * *"}, {"input": "10", "output": "3628800\n    \n\n* * *"}, {"input": "100000", "output": "457992974\n    \n\nPrint the answer modulo 10^{9}+7."}]