output_description: Print the answer modulo 10^{9}+7.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
attempt: # coding: utf-8
  # Your code here!
  # coding: utf-8
  from fractions import gcd
  from functools import reduce
  import sys
  
  sys.setrecursionlimit(200000000)
  from inspect import currentframe
  
  
  # my functions here!
  # 標準エラー出力
  def printargs2err(*args):
      names = {id(v): k for k, v in currentframe().f_back.f_locals.items()}
      print(
          ", ".join(names.get(id(arg), "???") + " : " + repr(arg) for arg in args),
          file=sys.stderr,
      )
  
  
  def debug(*args):
      print(*args, file=sys.stderr)
  
  
  def printglobals():
      for symbol, value in globals().items():
          print('symbol="%s"、value=%s' % (symbol, value), file=sys.stderr)
  
  
  def printlocals():
      for symbol, value in locals().items():
          print('symbol="%s"、value=%s' % (symbol, value), file=sys.stderr)
  
  
  # 入力（後でいじる）
  def pin(type=int):
      return map(type, input().split())
  
  
  # input
  
  
  def resolve():
      (N,) = pin()
      ans = 1
  
      mod = 7 + (pow(10, 9))
      for i in range(1, N + 1):
          ans *= i
          ans %= mod
      print(ans)
  
      # print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])
  
  
  # if __name__=="__main__":resolve()
  
  """
  #printデバッグ消した？
  #前の問題の結果見てないのに次の問題に行くの？
  """
  """
  お前カッコ閉じるの忘れてるだろ
  """
  import sys
  from io import StringIO
  import unittest
  
  
  class TestClass(unittest.TestCase):
      def assertIO(self, input, output):
          stdout, stdin = sys.stdout, sys.stdin
          sys.stdout, sys.stdin = StringIO(), StringIO(input)
          resolve()
          sys.stdout.seek(0)
          out = sys.stdout.read()[:-1]
          sys.stdout, sys.stdin = stdout, stdin
          self.assertEqual(out, output)
  
      def test_入力例_1(self):
          input = """3"""
          output = """6"""
          self.assertIO(input, output)
  
      def test_入力例_2(self):
          input = """10"""
          output = """3628800"""
          self.assertIO(input, output)
  
      def test_入力例_3(self):
          input = """100000"""
          output = """457992974"""
          self.assertIO(input, output)
  
  
  if __name__ == "__main__":
      resolve()
  
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."}]