Write down the solution for this math problem: Solve -1223 = -1810*w + 1865*w + 812 for w.
-37