5. Around a racing table, several people sat, numbered in the direction of the clock's hands. The first of them has 1 euro more than the second, the second has 1 euro more than the third, and so on, the $n-1$-th has 1 euro more than the $n$-th. The first gives 1 euro to the second, the second gives 1 euro to the third, and so on, the $n-1$-th gives $n-1$ euros to the $n$-th, and the $n$-th gives $n$ euros to the first. The game continues from the beginning (the first gives 1 euro to the second, and so on) as long as possible. At the end of the game, it turned out that one of the players had four times more euros than one of his neighbors. How many people were sitting at the table and how much money did the "poorest" of them have at the beginning of the game?
Solution. Let $n$ people participate in the game, and let the "poorest" of them, i.e., the $n$-th at the beginning of the game, have $x$ euros. From the condition of the problem, after the first "round" of the game, the participants had (in the order of numbering):

$$
x+2 n-2, x+n-3, \ldots, x+1, x, x-1 \text { euros. }
$$

It follows that the game can continue for $x$ "rounds" after which the participants will have respectively: $x+(x+1)(n-1), n-2, n-3, \ldots, 2,1,0$ euros. Since the numbers $0,1,2, \ldots, n-2$ are consecutive natural numbers, only the first one can have four times more than his neighbor. However, his neighbors are the second and the $n$-th. From the fact that the latter has 0 euros at the end of the game, we get the equation:

$$
x+(x+1)(n-1)=4(n-2) \Leftrightarrow x=\frac{3 n-7}{n}=3-\frac{7}{n}
$$

For $n=1$ we get $x<0$ which is impossible, so $n=7$ and $x=2$.