Solve this math problem

Solve -817*d + 21457 - 684 = -27*d - 557 for d.
27