~/algor $ cat problems/for-qoshni-sonlar-kopaytmalari
Products of neighbours
Easy
1000 ms
64 MB
25%
A positive integer $n$ is given. Compute the sum:
$$S = 1 * 2 + 2 * 3 + 3 * 4 + \dots + n * (n + 1)$$
Input
One positive integer $n$.
Output
One integer — $S$.
Note
$1 \le n \le 10^{5}$
Examples
Input #1
3
Output #1
20
Input #2
5
Output #2
70