Problem

Source: Baltic Way 2010

Tags: combinatorics proposed, combinatorics



There is a pile of $1000$ matches. Two players each take turns and can take $1$ to $5$ matches. It is also allowed at most $10$ times during the whole game to take $6$ matches, for example $7$ exceptional moves can be done by the first player and $3$ moves by the second and then no more exceptional moves are allowed. Whoever takes the last match wins. Determine which player has a winning strategy.