10-8-1. There is a magical grid sheet of size $2000 \times 70$, initially all cells are gray. The painter stands on a certain cell and paints it red. Every second, the painter takes two steps: one cell to the left and one cell down, and paints the cell red where he ends up after the two steps. If the painter is in the leftmost column and needs to take a step to the left, he teleports to the rightmost cell of the same row with that step; if the painter is in the bottom row and needs to take a step down, he teleports to the top cell of the same column with that step. After several moves, the painter returns to the cell where he started. How many red cells are on the sheet at this moment?

The image below shows an example of the painter's moves: first the painter is in cell 1, then in cell 2, and so on.

![](https://cdn.mathpix.com/cropped/2024_05_06_924d513b32916f055c33g-08.jpg?height=554&width=739&top_left_y=1590&top_left_x=664)

Comment. Let's provide another, equivalent, formulation of this problem. A grid sheet of size $2000 \times 70$ is glued into a torus, as shown in the picture.

![](https://cdn.mathpix.com/cropped/2024_05_06_924d513b32916f055c33g-09.jpg?height=785&width=1545&top_left_y=367&top_left_x=267)

The painter walks on the torus "diagonally". After several moves, the painter returns to the cell where he started. How many red cells are on the sheet at this moment?
Answer: 14000.

Solution variant 1. We need to understand how many cells will be painted by the time the painter returns to the initial cell. Note that after every 2000 moves, the painter returns to the starting column, and after every 140 moves, he returns to the starting row. Therefore, he will return to the initial cell for the first time after $\operatorname{LCM}(2000,140)=14000$ moves. Thus, a total of 14000 cells will be painted red.

Comment. Note that the number of painted cells does not depend on which cell the painter starts from! This may not be obvious in the formulation with a sheet of paper, but it is clearer in the formulation with a torus: see the two paths starting from the red and blue cells in the figure. Intuitively, it is clear that these two paths are obtained from each other by a "shift" on the surface of the torus.
![](https://cdn.mathpix.com/cropped/2024_05_06_924d513b32916f055c33g-09.jpg?height=438&width=1732&top_left_y=2216&top_left_x=184)