The rental fee per week is 10% of the camera's value, so 10% of $5000 is $5000 * 0.10 = $500 per week.
John rented the camera for 4 weeks, so the total rental fee is $500 * 4 = $2000.
John's friend agreed to pay 40% of the rental fee, so he paid 40% of $2000, which is $2000 * 0.40 = $800.
Therefore, John had to pay $2000 - $800 = $1200 in total.
#### 1200
The answer is: 1200
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
After John's camera broke, he decided to rent a $5000 camera for 4 weeks. The rental fee was 10% of the camera's value per week. John's friend, who was present when the camera broke, agreed to pay 40% of the rental fee. How much did John have to pay in total?

### Answer:
