Gauss summation
Play and see how the problem is solved.
Information: Gauss summation