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 int[] nBirds = new int[5]; for(int i = 0; i < n; i++){ if(types[i] == 1){ nBirds[0]++; }else if(types[i] == 2){ nBirds[1]++; }else if(types[i] == 3){ nBirds[2]++; }else if(types[i] == 4){ nBirds[3]++; }else if(types[i] == 5){ nBirds[4]++; } } int maxIndex = 0; for (int i = 1; i < nBirds.length; i++) { int newMax = nBirds[i]; if ((newMax > nBirds[maxIndex])) { maxIndex = i; } } System.out.println(maxIndex+1); } }