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[] t1 = new int[6]; for(int types_i=0; types_i < n; types_i++){ int a = in.nextInt(); if(a==1) t1[1]++; else if(a==2) t1[2]++; else if(a==3) t1[3]++; else if(a==4) t1[4]++; else if(a==5) t1[5]++; } int max = 1; for(int i=2;i<6;i++) { if(t1[i]>t1[max]) max=i; } System.out.println(max); } }