##Pyth - 15 10 * .5 = 5
smr-QdhQUQ
Expects input on stdin. Independently discovered algorithm. Thanks @Sp3000 for helping me stick the last Q in there :P Also, irony? XD
Explanation:
Q=eval(input()) : implicit
s : The sum of...
m UQ : map(...,range(Q))
r-QdhQ : range(Q-d,Q+1)