What is the solution to this math problem?
Solve -394*d = 1287 - 632 + 4861 for d.
-14