All problems

Factorial of a Number

easyPythonMathLoops

A museum is deciding how to lay out a row of exhibits and wants to know how many different orders are possible before it starts arguing about which one is best. With n exhibits the number of distinct arrangements is n! — that is n factorial, the product of every whole number from 1 up to n.

Task: Read the number of exhibits and print how many arrangements there are.

Input

A single line holding one integer n, with 0 ≤ n ≤ 15.

Output

One line holding a single integer: n!. By definition 0! is 1.

Example:

Input:
5

Output:
120

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…