The task is to generate the correct answer for a given math problem.

Problem: an army ' s recruitment process included n rounds of selection tasks . for the first a rounds , the rejection percentage was 60 percent per round . for the next b rounds , the rejection percentage was 50 percent per round and for the remaining rounds , the selection percentage was 70 percent per round . if there were 10000 people who applied for the army and 350 were finally selected , what was the value of n ?
9