a) One Sunday, Zvezda wrote 14 numbers in a circle, so that each number is equal to the sum of its two neighbors. Prove that the sum of all 14 numbers is 0 .

b) On the next Sunday, Zvezda wrote 21 numbers in a circle, and this time each number was equal to half the sum of its two neighbors. What is the sum of all 21 numbers, if one of the numbers is 3 ?
a) Denoting the numbers $a_{1}, a_{2}, \ldots, a_{14}$, and their sum as $S$ we have $a_{i}=$ $a_{i-1}+a_{i+1}$ for $i=1, \ldots, 14$ (we take $a_{15}=a_{1}, a_{0}=a_{14}$ ). Summing all these equalities we get $S=2 S$ (since each $a_{i}$ appears exactly once on the left and exactly twice on the right). Therefor $S=0$.

b) Again, let the numbers be $a_{1}, \ldots, a_{21}$. Let $a_{i}$ be maximal among the numbers. Then we have $a_{i} \geq a_{i-1}, a_{i} \geq a_{i+1}$ and so $a_{i} \geq \frac{a_{i-1}+a_{i+1}}{2}$. But $a_{i}=\frac{a_{i-1}+a_{i+1}}{2}$, so both inequalities are actually equalities. Next, considering now $a_{i-1}$ we conclude $a_{i+1}=a_{i+2}$. Proceeding in this way, we conclude that all the numbers are equal. As one of them is 3 , the sum of all numbers is $3 * 21=63$.