Factorial

Lab Python Beginner 10 points

Read n (0 ≤ n ≤ 30) and print n! (the product 1 × 2 × … × n; 0! = 1).

Input

One integer.

Output

n!

Example

Input

5

Output

120
Sample input available Sample output available
Editor
Python

Hints

Start the product at 1, not 0.

Solution explanation

Python integers have no size limit, so 30! prints exactly.

Show solution
n = int(input())
result = 1
for i in range(2, n + 1):
    result *= i
print(result)
Output
Answer
HOME LEARN COMMUNITY DASHBOARD