From a barrel, we pour out 4 liters of wine and replace it with 4 liters of water. From the resulting mixture, we again pour out 4 liters and replace it with 4 liters of water. We repeat this process a total of three times, and in the final result, there is 2.5 liters more water than wine. How many liters of wine were originally in the barrel?
Let there be $x$ liters of wine in the barrel initially. After the first tapping, $x-4$ liters remain. After replacing the 4 liters with water, the wine content in 1 liter of the mixture is: $\frac{x-4}{x}$ liters. Thus, the second tapping lets out $4 \cdot \frac{x-4}{x}$ liters of wine from the barrel, and in the barrel remains

$$
x-4-4 \cdot \frac{x-4}{x}=\frac{(x-4)^{2}}{x}
$$

liters of wine. After replenishing with more water, 1 liter of the mixture contains $\frac{(x-4)^{2}}{x^{2}}$ liters of pure wine. Thus, after the third tapping, in the barrel remains

$$
\frac{(x-4)^{2}}{x}-4 \cdot \frac{(x-4)^{2}}{x^{2}}=\frac{(x-4)^{3}}{x^{2}}
$$

liters of wine. The amount of water that has entered is $x-\frac{(x-4)^{3}}{x^{2}}$ liters. According to the problem, this is 2.5 liters more than the amount of wine:

$$
\frac{(x-4)^{3}}{x^{2}}=x-\frac{(x-4)^{3}}{x^{2}}-2.5
$$

Multiplying through by $x^{2}$ and rearranging:

$$
2(x-4)^{3}-x^{3}+2.5 x^{2}=0
$$

from which

$$
x^{3}-21.5 x^{2}+96 x-128=0
$$

We need to find the roots of the obtained equation. The equation can be transformed as follows:

$$
\begin{aligned}
& x^{3}-16 x^{2}-5.5 x^{2}+88 x+8 x-128= \\
= & x^{2}(x-16)-5.5 x(x-16)+8(x-16)= \\
= & (x-16)\left(x^{2}-5.5 x+8\right)=0 .
\end{aligned}
$$

One root of the equation is $x=16$, and the other two roots are provided by the quadratic factor. Since the discriminant of the resulting quadratic equation is negative, the equation has no more real solutions.

Therefore, there were originally 16 liters of wine in the barrel. We can verify by calculation that the obtained solution is indeed correct.