4. On the board, you can either write two ones, or erase two already written identical numbers $n$ and write the numbers $n+k$ and $n-k$, provided that $n-k \geqslant 0$. What is the minimum number of such operations required to obtain the number $2048?$
4. Answer: 3071.

We can consider that the operations of adding two units are performed first. There are no fewer than 1024 such operations because only such an operation increases the final sum (by 2) and the final sum is 2048.

We will show that after this, 2047 operations will be required. Let's give individuality to the units and consider the trajectories of the units that make up the number 2048. They form a binary tree with 2048 hanging vertices. Intermediate vertices represent operations, and their number is equal to the number of hanging vertices minus one.