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