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]; int[] t = new int[n+1]; for(int types_i=0; types_i < n; types_i++){ int input = in.nextInt(); types[types_i] = input; if(input == 1) t[1] += 1; else if(input == 2) t[2] += 1; else if(input == 3) t[3] += 1; else if(input == 4) t[4] += 1; else if(input == 5) t[5] += 1; } // your code goes here int typeNum = 1; int typecount = t[1]; for(int i=1; i<6; ++i) { if(typecount < t[i]) { typeNum = i; typecount = t[i]; } } System.out.print(typeNum); } }