시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 128 MB73126721536.195%

문제

On the first day of Christmas, my true love gave to me, a partridge in a pear tree.

Great. I wanted an iPad.

On the second day of Christmas, my true love gave to me, two turtle doves, and a partridge in a pear tree.

OK, now I have 4 birds: two turtle doves and a partridge today, and a partridge from yesterday. My cats are going crazy.

On the third day of Christmas, my true love gave to me, three french hens, two turtle doves, and a partridge in a pear tree.

What's with the birds? I now have ten of them, and no place to put them (except insidethe cats). How long can my true love keep this up?

Given a number of days of Christmas, figure out the total number of gifts I'm going to receive.

입력

There will be several test cases in the input. Each test case will consist of a single integer n (1≤n≤1,000,000), on its own line. The input will end with a line with a single 0.

출력

For each test case, output a single integer, indicating the number of gifts I’m going to receive, in total. Output no spaces, and do not separate answers with blank lines.

예제 입력 1

1
2
3
0

예제 출력 1

1
4
10