## Task 4 - 100734

According to the legend, the Bohemian Queen Libussa made the granting of her hand dependent on the solution of a riddle that she gave to her three suitors:

"If I give the first suitor half of the contents of this basket of plums and one more plum, the second suitor half of the remaining contents and one more plum, and the third suitor half of the now remaining contents and three more plums, the basket would be emptied. Name the number of plums that the basket contains!"
If $x$ is the number of plums the basket contains, then the first suitor receives $\left(\frac{x}{2}+1\right)$ plums. As a remainder, there are $x-\left(\frac{x}{2}+1\right)=\frac{x}{2}-1$ plums left.

The number of plums the second suitor receives is then

$$
\frac{\frac{x}{2}-1}{2}+1=\frac{x}{4}+\frac{1}{2}
$$

and as the new remainder, there are plums in the amount of

$$
\left(\frac{x}{2}-1\right)-\left(\frac{x}{4}+\frac{1}{2}\right)=\frac{x}{4}-\frac{3}{2}
$$

The number of plums the third suitor receives is then

$$
\frac{\frac{x}{4}-\frac{3}{2}}{2}+3=\frac{x}{8}+\frac{9}{4}
$$

After this, the basket is emptied, which leads to the equation

$$
\left(\frac{x}{4}-\frac{3}{2}\right)-\left(\frac{x}{8}+\frac{9}{4}\right)=0
$$

From this, $x=30$ follows. Therefore, the sought number can only be 30.