Cumulative sum of consequent numbers in each group

I found it: