What is the solution to this math problem?
Solve 1790 = -580*m + 12975 + 4475 for m.
27