Skip to main content
LIVE CONTEST: ALGOR Contest: Round #4 (Special Challenge) is live now!
ALGOR Contest: Round #4 (Special Challenge)
Problem E · 200 points · ICPC rules

~/algor $ cat contests/round-4/E

E. Sum of squares

1000 ms 64 MB

A positive integer $N$ is given. Compute the sum of the squares of the first $N$ positive integers:

$$S = 1^{2} + 2^{2} + 3^{2} + \dots + N^{2}$$

The sum of the areas of squares

Input

One positive integer $N$.

Output

One integer — the sum of squares.

Note

$1 \le N \le 1000$

Examples

Input #1
3
Output #1
14
Input #2
5
Output #2
55

Sign in to submit a solution

Signing up is free and takes a minute.