This is a profit and loss problem in the third-grade Olympiad, which is hard for the second-grade children to accept.
Profit+loss-difference
small profits but quick turnover
(big loss-small loss)
The number of children in this question is: (3+4) (8-7) = 7.
The number of sweets is 7× 7+3 = 52.