Sarah is preparing for her final exams and plans to study for a total of 40 hours over the next week. She decides to allocate 30% of her study time to mathematics, 25% to science, and the remaining time to history. How many hours will Sarah spend studying history? Let's think step by step and output the final answer within \boxed{}.
user