Problem

Source: 2021 Ukraine NMO 9.1 10.1

Tags: combinatorics, game, game strategy



Alexey and Bogdan play a game with two piles of stones. In the beginning, one of the piles contains $2021$ stones, and the second is empty. In one move, each of the guys has to pick up an even number of stones (more than zero) from an arbitrary pile, then transfer half of the stones taken to another pile, and the other half - to remove from the game. Loses the one who cannot make a move. Who will win this game if both strive to win, and Bogdan begins? (Oleksii Masalitin)