Dreamoon big fan Codeforces contestsOne day claim collect place 1 54 rate contest its amazingbase come follow problemThere person participate n Codeforces round his place round a_1 place second round a_2 place nth round a_nyou give positive nonzero integer xPlease find large v person collect place 1 v x rate contestsin word need find large v possible x rate contest 1 leq leq v exist contest person take ith placeFor example n6 x2 a3115710 answer v5 contest place 2 4 collect place 1 5 possible v5