All Submissions


In the workshop, we discussed about the maximum number of regions formed using straight lines. But what if we have Bent Lines as shown. Given N bent Lines and an infinite sized plane, we need the maximum number of regions in which the plane can be divided. See the figure for examples.



Input

Each line contains a value of N. Read till EOF.

0<= N <= 3 x 109

Output

Each line contains the maximum number of regions.

Sample Input


0
1
2
3
4
5
10


Sample Output


1
2
7
16
29
46
191


Problem Setter: Rounak Tibrewal

Languages: C,C++,Java

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0