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 t1 = 0; int t2 = 0; int t3 = 0; int t4 = 0; int t5 = 0; int[] l = new int[5]; for(int i = 0 ; i < n ; i++) { if(types[i] == 1) l[0] = l[0] + 1; if(types[i] == 2) l[1] = l[1] + 1; if(types[i] == 3) l[2] = l[2] + 1; if(types[i] == 4) l[3] = l[3] + 1;; if(types[i] == 5) l[4] = l[4] + 1;; } int max = 0; int index = -1; for(int i = 0 ; i < 5 ; i++) { if(l[i] > max) { max = l[i]; index = i+1; } } System.out.println(index); /*for(int i = 0 ; i < 5 ; i++) { if(l[i] == max) System.out.println(l[i+1]); }*/ } }