Problem 8.5. In a race, several people participated, including Andrey, Dima, and Lёnya. No two participants of this race arrived at the same time.

- The number of people who arrived before Andrey is 2 times less than the number of people who arrived after him.
- The number of people who arrived before Dima is 3 times less than the number of people who arrived after him.
- The number of people who arrived before Lёnya is 4 times less than the number of people who arrived after him.

What is the smallest number of people that could have participated in the race?
Answer: 61.

Solution. Let $x$ be the number of people who ran before Andrey, then $2x$ people ran after him. We get that there were $3x+1$ participants in the race.

Let $y$ be the number of people who ran before Dima, then there were $4y+1$ participants in total.

Finally, let $z$ be the number of people who ran before Lenya, then there were $5z+1$ participants in total.

If we subtract 1 from the total number of runners, the result should be divisible by 3, 4, and 5. The smallest such number is 60, so there were at least 61 participants.

It remains to note that the condition could have been met with 61 participants. For example, if among them Andrey came in 21st, Dima in 16th, and Lenya in 13th.