Answer:
Since we do not know the balance we should start with, a general answer:

598 - 47,27 = 550,73, assuming b_old was 0$ for your example
Explanation:
b stands for balance (old - before any deposits or withdrawals, new after all done)
d for deposits
w for withdrawals