3. One working day, $40\%$ of the students from the first shift in a primary school bought a bagel for lunch, $36\%$ of the students bought a sandwich, and the rest bought a croissant.

In the second shift at the same school:

- the number of students who bought a croissant for lunch is $37.5\%$ higher than the number of students from the same school in the first shift who bought a croissant for lunch;
- the number of students who bought a sandwich for lunch is $75\%$ higher than the number of students from the same school in the first shift who bought a sandwich for lunch; and
- the number of students who bought a bagel for lunch is $75\%$ lower than the number of students from the same school in the first shift who bought a bagel for lunch.

In which shift is the number of students greater than the number of students in the other shift? By what percentage is it greater?
Solution. Let's denote with $x$ the total number of students from the first shift. For dinner, they bought: a bagel $0.4 x$ students; a sandwich 0.36 students; and a croissant $(1-(0.4+0.36)) x=0.24 x$ students.

In the second shift, croissants were bought by: $0.24 x+0.375 \cdot 0.24 x=0.33 x$ students; sandwiches were bought by $0.36 x+0.75 \cdot 0.4 x=0.63 x$ students; and bagels were bought by $0.4 x-0.75 \cdot 0.4 x=0.1 x$ students. The total number of students from the second shift is $0.33 x+0.63 x+0.1 x=1.06 x=x+0.06 x$. Since $0.06=6\%$, we conclude that in the second shift, there were $6\%$ more students in the school compared to the first shift.