eolymp
bolt
Try our new interface for solving problems
Problems

Recursion - 1

Recursion - 1

Time limit 1 second
Memory limit 128 MiB

Implement the recursive function:

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

Input data

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

Output data

Print the value of f(n).

Examples

Input example #1
5
Output example #1
15