The sum is all the numbers added up. So add every number from 1 to 40 like this...
1+2+3+4+5+6 and so on... all the way to 40. When we do this we get 820, which is the answer.
Here’s another algebraic method:
We can have the sum by using the following formula
N * (N + 1) / 2
So we have:
40 * (40 + 1) / 2 = 820
I hope this helps!