I've read that if $M_1, \dots, M_n$ are matrices in $\mathrm{SL}(2, \mathbb{Z})$ whose product is the identity, and each is conjugate to the shear
$$ \begin{pmatrix} 1 & 1 \\ 0 & 1\end{pmatrix}, $$
then $n$ is a multiple of $12$. This appears, for example, at the bottom of p25 of this paper of Symington, with references to two books on four-manifolds. Is there a simple algebraic proof of this fact, or intuition for why the number 12 should be involved?