Math problem: Solve 585*n - 1291*n - 349 = 706*n - 8821 for n.
What is the solution?
6