output_description: Print the answer modulo 10^{9}+7.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
attempt: #!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(map(lambda x: int(x) - 1, 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()
  
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."}]