Compute cumulative salaries