#P7540. [COCI 2009/2010 #1] DOMINO

[COCI 2009/2010 #1] DOMINO

Description

For all non-negative integer pairs (x,y)(x, y) that satisfy 0xyN0 \le x \le y \le N, find the value of x+y\sum{x} + \sum{y}.

Input Format

One line with one integer NN, as described in the statement.

Output Format

One line with one integer, representing the value of x+y\sum{x} + \sum{y}.

2
12
3
30
15
2040

Hint

Sample 2 Explanation

All pairs that satisfy the requirement are: (0,0)(0,0), (0,1)(0,1), (0,2)(0,2), (0,3)(0,3), (1,1)(1,1), (1,2)(1,2), (1,3)(1,3), (2,2)(2,2), (2,3)(2,3), (3,3)(3,3).

Constraints

For 100%100\% of the testdata, 1n1031 \le n \le 10^3.

Notes

The scoring of this problem follows the original COCI problem settings, with a full score of 5050.

Translated from COCI2009-2010 CONTEST #1 T2 DOMINO.

Translated by ChatGPT 5