Write down the solution for this math problem: Solve 0 = -507*p - 9145 + 4431 - 6947 for p.
-23