There were an equal number of boys and girls in a school auditorium. After 24 boys left the auditorium, there were 3 times as many girls as boys. How many children were there in the beginning?