Skip to main content
LIVE CONTEST: ALGOR Contest: Round #4 (Special Challenge) is live now!

~/algor $ cat problems/ketma-ket-kvadratlar-yigindisi

Sum of consecutive squares

Easy 1000 ms 64 MB 24%
Share

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

$$S = N^{2} + (N + 1)^{2} + (N + 2)^{2} + \dots + (2 * N)^{2}$$

The sum of squares from N to 2N

Input

One positive integer $N$.

Output

One integer — the sum.

Note

$1 \le N \le 1000$

Examples

Input #1
1
Output #1
5
Input #2
2
Output #2
29

Sign in to submit a solution

Signing up is free and takes a minute.