#38293: python


40957017O (unknown)


while True:
  try:
    n = int(input())
    product = 1
    i = 1
    while (i <= n):
      product *= i
      i += 1
    print(str(n)+"!")
    print(product)
  except:
    break