Math problem: Solve 177*g + 48*g = 38*g + 6171 for g.
What is the solution?
33