Challenge: Compute the Factorial of the Given Number

Use what you have learned about repetition to calculate the factorial of the given number.

Problem statement

Suppose that you have a non-negative number, and you have to compute its factorial. For instance, you have the number 5. The factorial of 5 is 120.

Input

The input is a non-negative number.

Output

The output is the factorial of the number.

Get hands-on with 1400+ tech skills courses.