Write down the solution for this math problem: Solve 9687*q = 77225 + 368377 for q.
46