Write down the solution for this math problem: Solve -636*w + 12756 = 1978*w + 214*w - 74912 for w.
31