$\left[\begin{array}{c}\text { Absolute value of a number }\end{array}\right]$
$\left[\begin{array}{c}\text { Evenness and oddness }\end{array}\right]$
$\left[\begin{array}{l}\text { Partitions into pairs and groups; bijections }\end{array}\right]$
[ Examples and counterexamples. Constructions ]

Find the maximum value of the expression $|\ldots|\left|x_{1}-x_{2}\right|-x_{3}\left|-\ldots-x_{1990}\right|$, where $x_{1}, x_{2}, \ldots, x_{1990}$ are distinct natural numbers from 1 to 1990.
The modulus of the difference of two non-negative numbers is not greater than their maximum.

## Solution

Estimate. Note that the modulus of the difference of two non-negative numbers is not greater than their maximum. Therefore, $\left|x_{1}-x_{2}\right|$ $\leq \max \left\{x_{1}, x_{2}\right\}$

||$x_{1}-x_{2}\left|-x_{3}\right| \leq \max \left\{x_{1}, x_{2}, x_{3}\right\},|\ldots|\left|x_{1}-x_{2}\right|-x_{3}\left|-\ldots-x_{1990}\right| \leq \max \left\{x_{1}, x_{2}, \ldots, x_{1990}\right\}$. This expression cannot equal 1990, since the parity of this expression matches the parity of the sum $x_{1}+x_{2}+\ldots+x_{1990}=1+2+$ ... + 1990, and this sum contains 995 odd terms.

Example. Note that |||| $4 k+2|-(4 k+4)|-(4 k+5)|-(4 k+3)|=0$. Therefore,

$|\ldots||| 2-.4|-5|-3|-\ldots-(4 k+2)|-(4 k+4)|-(4 k+5)|-(4 k+3)|-\ldots-1986|-1988|-1989|-1987|-1990|-1|=| \mid 0$ $-1990|-1|=1989$

Answer

1989.