7. (40 points) Among the pensioners of one of the stars in the Tau Ceti system, the following pastime is popular: a board with a grid of 2016 by 2017 is painted in gold and silver colors in a checkerboard pattern, after which the numbers 0 or 1 are written at the vertices of each cell in such a way that the sum of the numbers at the vertices of any gold cell is even, and the sum of the numbers at the vertices of any silver cell is odd. What can the sum of the numbers written in the four corners of the entire board be?

![](https://cdn.mathpix.com/cropped/2024_05_06_77a10ef45de5bd421155g-5.jpg?height=434&width=759&top_left_y=166&top_left_x=563)
Answer: 0, 2 or 4.

Solution: By adding the sums of the numbers at the vertices of all cells, we get an even number, since the entire board consists of an even number of cells. Since all vertices, except for the corner ones, are counted an even number of times, and the corner ones are counted once, the sum of the numbers at the vertices of the corner cells is even. Therefore, it is equal to 0, 2 or 4. It remains to construct the corresponding examples. Note that if you write zeros and ones in all vertices of the cells on the left and top sides of the board in any way, then moving sequentially from left to right along the rows, starting from the top, you can fill in the numbers in all vertices while maintaining the condition of the problem. To construct an example with the sum of the corner cells equal to 0, it is enough to start with a set of all zeros, and to construct the other two examples, replace one of the zeros in one or three corner cells with a one, respectively.