A car rental company charges $40 per day for renting a car. They offer a 10% discount if the car is rented for more than 7 days. If John rents the car for 10 days, how much does he have to pay after applying the discount? Let's think step by step and output the final answer within \boxed{}.
user