Poodyissiy 0. .

Two players take turns writing natural numbers from 1 to 1000 on the board. The first player writes the number 1 on the board with the first move. Then, on the next move, the player can write either the number $2a$, or the number $a+1$, if the number $a$ is already written on the board. At the same time, it is forbidden to write numbers that are already on the board. The player who writes the number 1000 wins. Who wins with correct play?
Note that if one of the players writes the number 500 or 999 on the board (let's call such a move a losing move), then their opponent will write the number 1000 on the next move and win.

What numbers can be written on the board before the numbers 500 and 999 appear?

Firstly, these are all numbers from 1 to 499 (499 numbers).

Secondly, these are all numbers from 502 to 998 (497 numbers), as 502 can be obtained from the number 251.

Also note that the number 501 can only result from the number 500. That is, before the appearance of the number 500 or 999, there will be 499 + 497 = 996 non-losing moves. This means that the losing move will be made by the first player.

## Answer

The second player wins.