5. At the railway platform, many people gathered early in the morning waiting for the train. On the first train, one-tenth of all those waiting left, on the second train, one-seventh of the remaining left, and on the third train, one-fifth of the remaining left. How many passengers were initially on the platform if 216 passengers remained after the departure of the third train?
Solution. Solving from the end, we get that before the departure of the third train, there were $216: 6 \cdot 5=270$ passengers on the platform, before the departure of the second - $270: 6 \cdot 7=315$ passengers, before the departure of the first - $315: 9 \cdot 10=350$ passengers.

Answer: 350 passengers.