///////////////No.79 過小評価ダメ・ゼッタイ //入力文字読み取り process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function (chunk) { //すべて受け取り改行で区切って格納 var input = chunk.split("\n"); //評価した人数 var evaluationnumber = Number(input[0]) //評価数字の一覧 var evaluation = input[1].split(" ").map(Number) var one =0 var two =0 var three=0 var four=0 var five=0 var six=0 for (var i = 0; i < evaluation.length; i++) { if (evaluation[i] === 1) { one++ }else if (evaluation[i] === 2) { two++ }else if (evaluation[i] === 3) { three++ }else if (evaluation[i] === 4) { four++ }else if (evaluation[i] === 5) { five++ }else if (evaluation[i] === 6) { six++ } } //評価数が最も多い数字 var max = Math.max(one, two, three, four, five, six); //同じ評価数のときはレベルの高い方順 if (max == six) { console.log(6) } else if(max == five) { console.log(5) } else if (max == four) { console.log(4) } else if (max == three) { console.log(3) } else if (max == two) { console.log(2) } else if (max == one) { console.log(1) } });