# Task 2. (10 points)

Given 2018 numbers $x_{1}, x_{2}, \ldots, x_{2018}$, each of which is either $2-\sqrt{3}$ or $2+\sqrt{3}$. Find the greatest possible value of the sum $x_{1} x_{2}+x_{3} x_{4}+x_{5} x_{6}+\ldots+x_{2017} x_{2018}$, given that it is an integer.
# Solution.

Note that the product $x_{2 k-1} x_{2 k}$ can take one of three values:

$$
\begin{aligned}
& (2-\sqrt{3})(2-\sqrt{3})=7-2 \sqrt{3} \\
& (2+\sqrt{3})(2+\sqrt{3})=7+2 \sqrt{3}
\end{aligned}
$$

or

$$
(2-\sqrt{3})(2+\sqrt{3})=1
$$

Let $a$ be the number of times the number $2-\sqrt{3}$ appears in the considered sum, and $b$ be the number of times the number $2+\sqrt{3}$ appears. Then the number of terms equal to 1 in this sum will be $1009-a-b$. In this case, the sum is

$$
a(7-2 \sqrt{3})+b(7+2 \sqrt{3})+1009-a-b=1009+6 a+6 b+7(b-a) \sqrt{3}
$$

Since the sum is an integer, then $a=b$, and the sum is $1009+12 a$.

Since $a$ can take values from 0 to 504

$(2 a=a+b \leq 1009 \Rightarrow a \leq 504.5)$, the maximum value of the considered sum is $1009+12 \cdot 504=7057$.

Answer. 7057.

| Criterion | Evaluation | Points |
| :---: | :---: | :---: |
| Complete solution. | + | 10 |
| All main logical steps of the solution are provided. The answer is incorrect due to a computational error or typo. | $\pm$ | 7 |
| Main logical steps of the solution are provided. | $+/ 2$ | 5 |
| Main idea of the solution is found. The answer is missing or incorrect. | $\mp$ | 2 |
| The answer is correct. The solution is missing or incorrect. | $\mp$ | 0 |
| The solution does not meet any of the criteria described above. | $-/ 0$ | 0 |
| Maximum score | 10 |  |

All-Russia School Olympiad "Mission Possible. Your Calling - Financier!"

| The solution lacks a rigorous justification of individual conclusions. In particular, it may not be proven that the given answer corresponds to the maximum value. The answer is correct. |  |  |
| :---: | :---: | :---: |
| The main idea of the solution is found. The answer is missing or incorrect. | $\mp$ | 2 |
| The answer is correct. The solution is missing or incorrect. | $\mp$ | 0 |
| The solution does not meet any of the criteria described above. | $-/ 0$ | 0 |
| Maximum score | 10 |  |