Recursion - 1#328

Recursion - 1

1 second
128 megabytes
Very easy (≈850)

Implement the recursive function:

f(n) = \begin{cases} 0, n = 0\\ f(n - 1) + n, n > 0 \end{cases}

Input

An integer n~(0 \le n \le 1000).

Output

Output the value of the function .

Examples

Example 1

Loading
Loading