Write down the solution for this math problem: Solve -974*w + 512*w + 1823 = -585*w - 1621 for w.
-28