What is the solution to this math problem?
Solve 165 = 13*n - 247 - 189 + 211 for n.
30