#K66337. Factorial Function

    ID: 32398 Type: Default 1000ms 256MiB

Factorial Function

Factorial Function

Given an integer n, compute the factorial of n defined as:

\( n! = \begin{cases} 1, & \text{if } n \leq 0, \\ 1 \times 2 \times \cdots \times n, & \text{if } n > 0. \end{cases}\)

Your task is to write a program that reads an integer from stdin and prints the factorial of that number on stdout. For non-positive integers the factorial is defined as 1.

inputFormat

The input consists of a single line containing one integer n.

stdin

outputFormat

Output a single integer representing the factorial of n.

stdout

## sample
5
120