1. To each vertex of a regular 63-gon, we assign one of the numbers 1 or -1. To each of its sides, we append the product of the numbers at its vertices and sum all the numbers next to the individual sides. Find the smallest possible non-negative value of such a sum.
SOLUTION. Let $S$ be the value we are examining, i.e., the sum of the numbers on the sides of the 63-gon. If we assign the number 1 to each vertex of the 63-gon, we get $S=63$, because each of its sides will be assigned the number 1. It is clear that for any chosen numbering of the vertices, it can be reached by gradually changing 1 to -1.

Now let's examine how the value of $S$ will change when we change the value at some vertex of the 63-gon from 1 to -1. Let's denote the values at the neighboring vertices as $a$ and $b$ (their order does not matter). By performing this change, we will obviously change the numbers on the two sides that emanate from this vertex (and on no others). In the calculation of the value of $S$, the values of exactly two addends will change.

If $a=b=1$, the sum $S$ will decrease by 4 (before the change, the numbers $a, b$ contributed $a+b=1 \cdot 1+1 \cdot 1=2$, and after the change, their contribution will be $1 \cdot(-1)+(-1) \cdot 1=-2$). Similarly, we can analyze the other possibilities:

| $a$ | $b$ | change in $a+b$ | difference in the value of $S$ |
| ---: | ---: | :---: | :---: |
| 1 | 1 | $2 \rightarrow-2$ | -4 |
| 1 | -1 | $0 \rightarrow 0$ | 0 |
| -1 | 1 | $0 \rightarrow 0$ | 0 |
| -1 | -1 | $-2 \rightarrow 2$ | 4 |

We see, therefore, that changing one number at a vertex does not change the remainder of the number $S$ when divided by four. At the beginning, we found that one of the achievable values is $S=63$, which gives a remainder of 3 when divided by four, so the smallest non-negative value must also give the same remainder of 3, hence we will look for the smallest possible value of the sum $S$ among the numbers $\{3,7,11, \ldots\}$.

As we can easily verify, the value $S=3$ can be achieved: it is enough to place the following 63 numbers in the vertices of the 63-gon in the given order

$$
\underbrace{1,1,-1,-1,1,1,-1,-1, \ldots, 1,1,-1,-1}_{60 \text { numbers }}, 1,1,1
$$

and we get $S=3$. However, the same sum can be achieved with a different choice of numbers.

GUIDING AND ADDITIONAL PROBLEMS:

N1. In the vertices of a regular 63-gon, we write 32 units and 31 zeros in any order, with one number in each vertex. To each of its sides, we write the product of the numbers in its vertices and sum all the numbers on the individual sides. Find the smallest value that this sum can take. [The sum is non-negative, and since there are more units than zeros, there will be at least two units next to each other on the perimeter, so each sum is at least 1, and such a sum can be achieved by regularly alternating the numbers 1 and 0 in the vertices of the sides: starting with a one in any vertex and ending with a one in the adjacent vertex from the opposite side.]

N2. To each vertex of a regular $n$-gon, we assign the number -1. In one step, it is allowed to change two adjacent numbers to their opposites. Determine for which values of $n$ it is possible to achieve, by repeating the steps, that all numbers are +1? [For even $n$ it is possible, for odd $n$ it is not. When changing two numbers, the remainder of the sum of all numbers when divided by four does not change, and the difference between the sum of all numbers in the desired and initial positions is $2 n$.]

D1. On each face of a cube, exactly one integer is written. In one step, we choose any two adjacent faces of the cube and increase the numbers written on them by 1. Determine the necessary and sufficient condition for the numbering of the faces of the cube at the beginning, so that after a finite number of suitable steps, the same numbers can be on all faces of the cube. [60-A-I-5]

D2. In each vertex of a regular 2008-gon $A_{1} A_{2} \ldots A_{n}$, there is one coin. We select two coins and move each of them to an adjacent vertex, one in the direction and the other against the direction of the clock hands. Decide whether it is possible in this way to gradually move all the coins a) into 8 piles of 251 coins each, b) into 251 piles of 8 coins each. [58-A-I-5]

D3. In each of the vertices of a regular $n$-gon $A_{1} A_{2} \ldots A_{n}$, there is a certain number of coins: in vertex $A_{k}$ there are exactly $k$ coins, $1 \leqq k \leqq n$. We select two coins and move each of them to an adjacent vertex, one in the direction and the other against the direction of the clock hands. Decide for which $n$ it is possible to achieve, after a finite number of such moves, that for any $k, 1 \leqq k \leqq n$, there will be $n+1-k$ coins in vertex $A_{k}$. $[58-\mathrm{A}-\mathrm{III}-5]$