#B3839. Cumulative Summation Challenge

    ID: 11496 Type: Default 1000ms 256MiB

Cumulative Summation Challenge

Cumulative Summation Challenge

Given a positive integer \( n \), compute the cumulative summation defined as:

\( 1+(1+2)+(1+2+3)+\cdots+(1+2+3+\cdots+n) \)

You are required to output the computed sum.

inputFormat

The input consists of a single line containing a positive integer \( n \) (e.g., \( 1 \le n \le 10^5 \)).

outputFormat

Output the cumulative summation result, computed as \( \sum_{i=1}^{n}\frac{i(i+1)}{2} \).

sample

1
1