eolymp
bolt
Try our new interface for solving problems
Problems

Simple Question

Simple Question

Given integer $n$, you must calculate the sum of all integers between $1$ and $n$ (including $1$ and $n$). \InputFile Each line has one integer $n~(|n| \le 10000)$. The last line contains $0$ and is not processed. \OutputFile For each value of $n$ print the answer on a separate line.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1
10
0
Output example #1
1
55