A factory manufactures two products, P and Q. Product P is manufactured at a rate of 100 units per day, and Product Q is manufactured at a rate of 150 units per day. In a certain period, the factory produced a total of 1000 units. If the factory spent twice as many days manufacturing Product Q as Product P, what is the total number of days the factory spent manufacturing Product P?