A farmer has a cart that can carry a maximum weight of 500 kilograms. He wants to load it with bags of apples and oranges. Each bag of apples weighs 25 kilograms, and each bag of oranges weighs 15 kilograms. If the farmer loads 12 bags of apples, how many bags of oranges can he load without exceeding the cart's weight limit? Let's think step by step and output the final answer within \boxed{}.
user