1535: Xiaoshi's Problem

内存限制:128 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:4 通过:4

题目描述

Xiaoshi is silly boy, but he has a mathematical mind. Occasionally he will have some crazy idea on math problems. This time he gives out such a problem : Please work out the summation of the following formula, Sum = 1 + 2 + ... + n, which satisfies n≤10^100000.
"Don't try to do a snow job on me. I know you couldn't solve it efficiently." I say to him.
"Ah... actually the formula is Sum = 1 + 2 + 3 + ... + 10^n, which satisfies n≤100000. Then can you effectively solve it?"

输入格式

Thre are multiple test cases. For each case, there is a line contains n which has been described above. (0≤n≤100000)
Input is terminated by one line contains "-1".

输出格式

Output the summation corresponding to each input n.

输入样例 复制

1
2
-1

输出样例 复制

55
5050