Write down the solution for this math problem: Solve -16409 + 7779 = -1001*w + 28407 for w.
37