5. (20 points) At a market in Egypt, a tourist is bargaining with a seller over a souvenir worth 10000 Egyptian pounds. The tourist first reduces the price by x percent $(0<x<100)$, then the seller increases the price by $x$ percent, and so on. The number $x$ remains constant throughout the bargaining, and the seller increases the price at least once. The bargaining continues until one of the participants receives a non-integer value for the price of the souvenir. Find the maximum possible number of price changes during such a bargaining session (including the final non-integer price).
Answer: 5.

Solution. The final cost of the souvenir can be found using one of two formulas (depending on who had the last word): $10000 \cdot\left(1-\frac{x}{100}\right)^{n} \cdot\left(1+\frac{x}{100}\right)^{n}$ or $10000 \cdot\left(1-\frac{x}{100}\right)^{n+1} \cdot\left(1+\frac{x}{100}\right)^{n}$.

After some transformations, we get $\frac{(100-x)^{n}(100+x)^{n}}{100^{2 n-2}}$ and $\frac{(100-x)^{n+1}(100+x)^{n}}{100^{2 n-2}}$.

An expression of the form $(100-x)^{a}(100+x)^{b}$ is divisible by $100^{t}$ for $a>0, b>0, x>0$ and $t>0$ at least once for $x=10 i, i=1, \ldots, 9$ (an even number, a multiple of 5).