For example, in a one-pile version of Nim, the game starts with a pile of stones, and the player to move may take any positive number of stones. If is zero stones, the nimber is 0 because the mex of the empty set of legal moves is the nimber 0. If is 1 stone, the player to move will leave 0 stones, and , gives the nimber for this case. If is 2 stones, the player to move can leave 0 or 1 stones, giving the nimber 2 as the mex of the nimbers . In general, the player to move with a pile of stones can leave anywhere from 0 to stones; the mex of the nimbers is always the nimber . The first player wins in Nim if and only if the nimber is not zero, so from this analysis we can conclude that the first player wins if and only if the starting number of stones in a one-pile game of Nim is not zero; the winning move is to take all the stones.