Calculation of remaining money