When James had a car accident, the total cost for the emergency room visit was $4500. His insurance requires him to pay $1000 deductible towards the total cost and 10% of the remaining balance. How much does James have to pay in total for the emergency room visit?