Problem 11.8. In each cell of a strip $1 \times N$ there is either a plus or a minus. Vanya can perform the following operation: choose any three cells (not necessarily consecutive), one of which is exactly in the middle between the other two cells, and change the three signs in these cells to their opposites. A number $N$ is called positive if from an arrangement of $N$ minuses Vanya can, by such operations, obtain an arrangement of $N$ pluses.

Consider the numbers $3,4,5, \ldots, 1400$. How many of them are positive?
Answer: 1396.

Solution. We will prove that all the numbers under consideration are positive, except for 4 and 5. Then the answer to the problem will be $1398-2=1396$.

For each $N$, we will number the cells of the strip $1 \times N$ from left to right with numbers from 1 to $N$.

- Let $N=3$. By applying the operation to the cells with numbers $(1,2,3)$, we immediately obtain a configuration of all pluses.
- Let $N=6$. By applying the operations to the cells with numbers $(1,2,3)$ and to the cells with numbers $(4,5,6)$, we immediately obtain a configuration of all pluses.
- Let $N=7$. By applying the operations to the cells with numbers $(1,4,7)$, to the cells with numbers $(2,3,4)$, and to the cells with numbers $(4,5,6)$, we immediately obtain a configuration of all pluses.
- Let $N \geqslant 8$. By applying the operations to the cells with numbers $(N, N-1, N-2)$, to the cells with numbers $(N-3, N-4, N-5)$, and so on, we can achieve a configuration where pluses are in all cells of the strip, except possibly in cells with numbers 1 and 2. If there is a minus in cell number 2, apply the operations to the cells with numbers $(2,5,8)$, $(5,6,7)$, $(6,7,8)$, and we will get pluses in all cells from 2 to $N$ inclusive. If there is a minus in cell number 1, apply the operations to the cells with numbers $(1,4,7)$, $(4,5,6)$, $(5,6,7)$. Thus, we have achieved a configuration of all pluses.
- Let $N=4$. The operations can only be applied to the cells with numbers $(1,2,3)$ or $(2,3,4)$. Clearly, in this way, we can only obtain the configurations - - --, ,,,+++--++++--+ and it is impossible to obtain a configuration of all pluses.
- Let $N=5$. The operations can only be applied to the cells with numbers $(1,2,3)$, $(2,3,4)$, $(3,4,5)$, $(1,3,5)$. Note that in cells with numbers $2,3,5$, there is always an odd number of minuses, so it is impossible to obtain a configuration of all pluses.