1343 和数数列


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

一个数列1,3,6,10,15,21,…,每一个数都是从1到该项序的和数。例如,第五项的值15为从1加到5的和。现在对于每个给定的项数n,计算该数列从第1项到第n项的和。例如,给定项值5,则从第1项到第5项的和为35。

Input

有一些整数n(0<n<2344)。

Output

输出n所对应的从第1项到n项的和数列的和。每个输出占一行。

Sample

Input

3 5

Output

10
35

Source: 浙工大2008C++期中竞赛


Comments

There are no comments at the moment.