Sum the values in s for each label in the first level (totals for A, B, C).
s
Sample data: s:
A 0 0 1 1 2 2 3 3 4 4 5 5 ... (30 rows total)
solve(...)