You must not add the balance
That is not the logic. Well lets make an exception and add them once
Spent Balance
20 _____ 30
15 _____ 15
9 _____ 6
6 _____ 0
----------------
50 _____ 51
Lets make a justification here
Lets try deducing the spent part alone in descending order
Spent
20
15
9
6
------
50
50-6-9-15-20 = 0
Now lets try deducing the balance part alone in descending order
Balance
30
15
6
0
------
51
51-0-6-15-30 = 0
Riddle solved
Lets look up another example,
I have $100
Spent Balance
1 _____ 99
2 _____ 97
3 _____ 94
4 _____ 90
5 _____ 85
6 _____ 79
7 _____ 72
8 _____ 64
9 _____ 55
10 _____ 45
11 _____ 34
34 _____ 0
----------------
100 _____ 814
Hence it is not logical to sum up the balance part as it would give highly unjustified results