Problem 3. During the physical education class, the entire class lined up by height (all children have different heights). Dima noticed that the number of people taller than him is four times the number of people shorter than him. And Lёnya noticed that the number of people taller than him is three times less than the number of people shorter than him. How many people are there in the class, if it is known that there are no more than 30 people?
Answer: 21.

Solution. Let $x$ be the number of people who are shorter than Dima. Then, the total number of students in the class is $x$ (people who are shorter than Dima) $+4 x$ (people who are taller than Dima) +1 (Dima) $=5 x+1$ (total number of people in the class).

Let $y$ be the number of people who are taller than Lёnya. Then, the total number of students in the class is $y$ (people who are taller than Lёnya) $+3 y$ (people who are shorter than Lёnya) +1 (Lёnya) $=4 y+1$ (total number of people in the class).

Then, if we subtract 1 from the total number of children in the class, the resulting number will be divisible by both 4 and 5. That is, it will be divisible by 20. In the required range, there is only one such number - 20, so there are 21 people in the class.