Solving for the remaining amount