At the 4 PM show, all the seats in the theater were taken, and 65\% of the audience was children. At the 6 PM show, again, all the seats were taken, but this time only 50\% of the audience was children. Of all the people who attended either of the shows, 57\% were children, although there were 12 adults and 28 children who attended both shows. How many people does the theater seat?

Let's think step by step and output the final answer within \boxed{}.
user