import java.io.BufferedReader; import java.io.InputStreamReader; public class No79 { public static void main(String[] args) { try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); int[] Hyoka = new int[6]; String[] temp = br.readLine().split(" "); int[] temp2 = new int[N]; for(int i=0; i < N; i++) temp2[i] = Integer.parseInt(temp[i]); for(int i=0; i < N; i++) Hyoka[temp2[i] - 1]++; System.out.println(getI(Hyoka)); }catch(Exception e){ e.getStackTrace(); } } public static int getI(int[] x){ int I = 0; int max = 0; for (int i =0; i< x.length; i++){ if (x[i] >= max){ max =x[i]; I = i+1; } } return I; } }