package yukicoder; import java.util.Arrays; import java.util.Scanner; public class Yuki79 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int n_array[] = new int[n]; int ans_array[] = new int[6]; for (int i = 0; i < n; i++) { n_array[i] = scan.nextInt(); ans_array[n_array[i] - 1]++; } scan.close(); int ans = 0; int ans_i = 0; for(int i = 0; i < ans_array.length; i++ ) { //System.out.println(ans_array[i]); if(ans <= ans_array[i]){ ans = ans_array[i]; ans_i = i + 1; } } System.out.println(ans_i); } }