How to calculate a running total in Parabola