  We characterize sequences of positive integers $(a_1,a_2,\ldots,a_n)$ for
which the $2\times2$ matrix $\left( \begin{array}{cc} a_n&-1 1&0 \end{array}
\right) \left( \begin{array}{cc} a_{n-1}&-1 1&0 \end{array} \right) \cdots
\left( \begin{array}{cc} a_1&-1 1&0 \end{array} \right) $ is either the
identity matrix $\mathrm Id$, its negative $-\mathrm Id$, or square root of
$-\mathrm Id$. This extends a theorem of Conway and Coxeter that classifies
such solutions subject to a total positivity restriction.
