8. The tourists in a travel group are traveling by car, requiring an equal number of people in each car. If each car carries 30 people, one person will be left without a seat; if one car is removed, all tourists can be evenly distributed among the remaining cars. Given that each car can accommodate a maximum of 40 people, the total number of tourists is $\qquad$ people.
answer: 961