4. The seller has a certain number of live chicks. The first buyer asked to buy half of all the chicks and one more chick. Naturally, he was served. The next buyer asked for half of the remaining chicks and one more chick. He was also served. The third buyer also received half of the remaining chicks and one more chick. After serving the third buyer, the seller was left with no chicks at all.

How many chicks did the seller have?
Solution. First method. Let there be a total of x chickens. The first buyer bought: $\frac{x}{2}+\frac{1}{2}$, and the remaining are $x-\left(\frac{x}{2}+\frac{1}{2}\right)=\frac{x}{2}-\frac{1}{2}$ chickens. The second buyer bought: $\frac{1}{2}\left(\frac{x}{2}-\frac{1}{2}\right)+\frac{1}{2}=\frac{x}{4}+\frac{1}{4}$, and the remaining are $\frac{x}{2}-\frac{1}{2}-\left(\frac{x}{4}+\frac{1}{4}\right)=\frac{x}{4}-\frac{3}{4}$. Finally, the third buyer: $\frac{1}{2}\left(\frac{x}{4}-\frac{3}{4}\right)+\frac{1}{2}=\frac{x}{8}+\frac{1}{8}$, and the remaining are $\frac{x}{4}-\frac{3}{4}-\left(\frac{x}{8}+\frac{1}{8}\right)=\frac{x}{8}-\frac{7}{8}$, which means no chickens were left, leading to the equation $\frac{x}{8}-\frac{7}{8}=0$. The solution to this equation is $x=7$, i.e., the number of chickens was 7.

Second method. We will solve the problem by working backwards. The third buyer took half of the chickens and one more, leaving no chickens. This means that the half chicken he took was actually half of the chickens he found, i.e., he found $\frac{1}{2}+\frac{1}{2}=1$ chicken. Before the second buyer took half a chicken, there were $1+\frac{1}{2}=\frac{3}{2}$ chickens, which is half of the chickens he found, meaning he found $\frac{3}{2}+\frac{3}{2}=3$ chickens. Before the first buyer took half a chicken, there were $3+\frac{1}{2}=\frac{7}{2}$ chickens, which is half of the chickens the seller had. Therefore, the seller had $\frac{7}{2}+\frac{7}{2}=7$ chickens.