#Pyth, 7 bytes
Pyth, 7 bytes
sm**hdh
Try it online here.
Uses the formula in Neil's answer.
sm**hdhddQ Implicit: Q=eval(input())
Trailing ddQ inferred
m Q Map [0-Q) as d, using:
hd Increment d
* hd Multiply the above with another copy
* d Multiply the above by d
s Sum, implicit print