~/algor $ cat problems/while-qosh-faktorial
Double factorial (n!!)
Easy
1000 ms
64 MB
23%
A positive integer $n$ is given. Compute its double factorial $n!!$:
$$n!! = n * (n - 2) * (n - 4) * \dots$$
The last factor is $1$ if $n$ is odd and $2$ if $n$ is even.
Input
One integer $n$.
Output
One integer — $n!!$.
Note
$1 \le n \le 25$
Examples
Input #1
5
Output #1
15
Input #2
6
Output #2
48