Problem 5.6. Vanya received three sets of candies as a New Year's gift. In the sets, there are three types of candies: lollipops, chocolate, and jelly. The total number of lollipops in all three sets is equal to the total number of chocolate candies in all three sets, as well as the total number of jelly candies in all three sets. In the first set, there are an equal number of chocolate and jelly candies, and 7 more lollipops. In the second set, there are an equal number of lollipops and chocolate candies, and 15 fewer jelly candies. How many candies are in the third set, if it is known that there are no lollipops there?
Answer: 29.

Solution. There are more lollipops than jelly candies in the first set by 7, and in the second set by 15. Since the total number of each type of candy is the same in all sets, and there are 0 lollipops in the third set, there must be $7+15=22$ jelly candies in the third set.

Similarly, there are more lollipops than chocolate candies in the first set by 7, and in the second set by 0. Since the total number of each type of candy is the same in all sets, and there are 0 lollipops in the third set, there must be 7 chocolate candies in the third set.

Therefore, the total number of candies in the third set is $22+7+0=29$.