Editorial
Need a hint? Checkout the editorial.
View Editorial
Editorial
Try to find a pattern for which $n$ one player has a winning strategy.
Hint: for $n=1,2,3,4$ Nafis wins. If $n=5$, Arifa wins.
One day, Nafis and Arifa invented a new game out of boredom. They took turns taking stones from a pile of $n \le 2025$ stones. Nafis starts the game, and the one who takes the last stone wins. Arifa can take $1$, $2$, or $3$ stones in a move, while Nafis can take $2$, $3$, or $4$ stones in a move (Nafis can take $1$ stone only if it's the last stone). Find the sum of all values of $n$ for which Nafis has a winning strategy.
Try to find a pattern for which $n$ one player has a winning strategy.
Hint: for $n=1,2,3,4$ Nafis wins. If $n=5$, Arifa wins.