[ Linear inequalities and systems of inequalities ]

$$
\text { [ The extremal principle (miscellaneous). ] }
$$

Nine digits: $1,2,3, \ldots, 9$ are written in some order (forming a nine-digit number). Consider all triples of consecutive digits, and find the sum of the corresponding seven three-digit numbers. What is the maximum possible value of this sum?
Let $\overline{a b c d e f g h i}$ be a nine-digit number. From it, we form the sum $S=\overline{a b c}+\overline{b c d}+\overline{c d e}+\overline{d e f}+\overline{f f g}+\overline{f g h}+\overline{g h i}=$ $100 a+110 b+111(c+d+e+f+g)+11 h+i$. The sum $S$ reaches its maximum when the larger digits enter it with the larger coefficients. Therefore, $c, d, e, f$ and $g$ are $9,8,7,6$ and $5, b=4, a=3$, $h=2, i=1$. Then $S=4648$.

## Answer

4648.