<s>[INST] Solve congruence system $\ x\equiv m_i-1 \pmod{m_i}\,$ for $\,i = 1,\ldots, k$ Find natural number $x$ so that
$$\begin{align}x&\equiv 9\pmod{10}\\ x&\equiv8\pmod9\\ &\ \ \vdots\\ x&\equiv 1\pmod2\end{align}$$
 [/INST] \begin{align}
   x &\equiv 9 \pmod{10} \\
   x &\equiv 8 \pmod 9 \\
   x &\equiv 7 \pmod 8 \\
   x &\equiv 6 \pmod 7 \\
   x &\equiv 5 \pmod 6 \\
   x &\equiv 4 \pmod 5 \\
   x &\equiv 3 \pmod 4 \\
   x &\equiv 2 \pmod 3 \\
   x &\equiv 1 \pmod 2 \\
\end{align}
Is equivalent to
\begin{align}
   x &\equiv -1 \pmod{10} \\
   x &\equiv -1 \pmod 9 \\
   x &\equiv -1 \pmod 8 \\
   x &\equiv -1 \pmod 7 \\
   x &\equiv -1 \pmod 6 \\
   x &\equiv -1 \pmod 5 \\
   x &\equiv -1 \pmod 4 \\
   x &\equiv -1 \pmod 3 \\
   x &\equiv -1 \pmod 2 \\
\end{align}
which is equivalent to
$$x \equiv -1 \mod{\operatorname{lcm}\{2,3,4,5,6,7,8,9,10\}}$$
$$x \equiv -1 \pmod{2520}$$
$$x \equiv 2519 \pmod{2520}$$
</s>