What is the solution to this math problem?
Solve -d + 29 - 78 = -40 for d.
-9