21. Now buy soda in batches for $a$ people to drink. According to the merchant's rules, every $b\left(a>b>1, a, b \in \mathbf{N}^{+}\right)$ empty bottles can be exchanged for one bottle of soda, so it is not necessary to buy $a$ bottles of soda. How many bottles of soda must be bought at least to ensure that each of the $a$ people gets one bottle of soda?
21. Assume the minimum number of bottles to buy is $x$.

After drinking, the number of bottles exchanged for the first time does not exceed $\frac{x}{b}$. After drinking again, the number of bottles exchanged for the second time does not exceed $\frac{x}{b^{2}}$. This continues, and when $k$ is sufficiently large, $\frac{x}{b^{k-1}} \leqslant b-1$, so no more bottles can be exchanged. Therefore, the total number of bottles, including the original and the exchanged ones, is at most $x+\frac{x}{b}+\cdots+\frac{x}{b^{k-1}}$.
$$
\begin{aligned}
\therefore a & \leqslant x+\frac{x}{b}+\cdots+\frac{x}{b^{k-1}} \\
& a-\frac{a}{b} .
\end{aligned}
$$

Since $x$ is the smallest positive integer that satisfies the above inequality,
when $a$ is a multiple of $b$, $x=a-\frac{a}{b}+1$;
when $a$ is not a multiple of $b$,
$$
x=\left[a-\frac{a}{b}\right]+1=a-\left[\frac{a}{b}\right] \text {. }
$$

Therefore, when $a$ is a multiple of $b$, at least $a-\frac{a}{b}+1$ bottles need to be bought; when $a$ is not a multiple of $b$, at least $a-\left[\frac{a}{b}\right]$ bottles need to be bought.