import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] types = new int[n]; for(int types_i=0; types_i < n; types_i++){ types[types_i] = in.nextInt(); } // your code goes here TreeMap tree = new TreeMap<>(); tree.put(1, 0); tree.put(2, 0); tree.put(3, 0); tree.put(4, 0); tree.put(5, 0); for(int i = 0; i < n; i++){ switch(types[i]){ case 1: tree.put(1,tree.get(1)+1); break; case 2: tree.put(2,tree.get(2)+1); break; case 3: tree.put(3,tree.get(3)+1); break; case 4: tree.put(4,tree.get(4)+1); break; case 5: tree.put(5,tree.get(5)+1); break; } } int biggest = 0; int bigCount = tree.get(1); for(int i = 1; i <= 5; i++){ if((i+1) <= 5) if(tree.get(i+1) > bigCount){ bigCount = tree.get(i+1); biggest = i+1; } } in.close(); System.out.println(biggest); } }