Write down the solution for this math problem: Solve 282*p + 944 - 1588 = 2740 for p.
12