Solving for the remaining amount to spend