202. Simplify the sum

$$
\left[\frac{n+1}{2}\right]+\left[\frac{n+2}{4}\right]+\left[\frac{n+4}{8}\right]+\ldots+\left[\frac{n+2^{k}}{2^{k+1}}\right]+\ldots
$$

where $n$ is a positive integer.
202. First solution. In the result of problem 201 3), the sum of interest to us (which, obviously, contains only a finite number of non-zero terms) is equal to

$$
\begin{aligned}
& {\left[\frac{n}{2}+\frac{1}{2}\right]+\left[\frac{n}{4}+\frac{1}{2}\right]+\left[\frac{n}{8}+\frac{1}{2}\right]+\ldots=} \\
& =\left(\lfloor n\rfloor-\left[\frac{n}{2}\right]\right)+\left(\left[\frac{n}{2}\right]-\left[\frac{n}{4}\right]\right)+\left(\left[\frac{n}{4}\right]-\left[\frac{n}{8}\right]\right)+\ldots=[n]=n
\end{aligned}
$$

Second solution. For $n=1$, the sum in question is obviously equal to 1. Further, when replacing $n$ with $n+1$, each term of the sum either remains unchanged or increases by 1; in this case, only one term of the sum actually increases by 1, corresponding to such a value of $k$ that $2^k$ is the highest power of two by which $n+1$ is divisible. Indeed, if $n+1=2^k(2m+1)$, then

$$
\begin{aligned}
{\left[\frac{n+1+2^k}{2^{k+1}}\right]=\left[\frac{2^k(2m+2)}{2^{k+1}}\right] } & =m+1 \\
& \text { and }\left[\frac{n+2^k}{2^{k+1}}\right]=\left[m+1-\frac{1}{2^{k+1}}\right]=m
\end{aligned}
$$

while for $i \neq k$ we have $\left[\frac{n+1+2^i}{2^{i+1}}\right]=\left[\frac{n+2^i}{2^{i+1}}\right]$ (why?).

From this, by the principle of mathematical induction, it follows that the sum of interest to us is equal to $n$ for all $n$.