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 a=0, b=0, c=0, d=0, e=0; String msg = ""; for(int types_i=0; types_i < n; types_i++){ types[types_i] = in.nextInt(); } // your code goes here for (int i = 0; i < n ; i++) { if (types[i] == 1) a++; else if (types[i] == 2) b++; else if (types[i] == 3) c++; else if (types[i] == 4) d++; else if (types[i] == 5) e++; } int max = Math.max(a, Math.max (b, Math.max(c,(Math.max(d,e))))); if(max == a) msg = "1"; else if(max == b) msg = "2"; else if(max == c) msg = "3"; else if(max == d) msg = "4"; else if (max == e) msg = "5"; System.out.print(msg); } }