To find $ n $ we use formula
$$ \color{blue}{S_n = \frac{n}{2} (2 a_1 + (n-1)d) }$$In this example we have $ a_1 = -12 ~~,~~ d = 3 ~~,~~ S_n = 1104 $. After substituting these values to above formula, we obtain:
$$ \begin{aligned} S_n &= \frac{n}{2} (2 a_1 + (n-1)d) \\ 2 \cdot -12 &= n (2 \cdot \left( -12 \right) + (n-1) \cdot 3) \\ 2208 &= n (3 \cdot n -27) \\ 3n^2-27n-2208 &= 0 \end{aligned}$$The solutions of this quadratic equation are $ n_1 = -23 $ and $ n_2 = 32 $ (click here to see detailed explanation on how to slove quadratic equation).
The first few terms of this sequence are:
$$ -12, ~~~-9, ~~~-6, ~~~-3, ~~~0 . . . $$