What is the solution?

Solve -16*a - 871 + 167 = 31*a + 1223 for a.
-41