Solve this math problem

Solve 767 - 366 = -64*d - 431 for d.
-13