Write down the solution for this math problem: Solve -166 = -74*q + 500 for q.
9