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) { int one=0,two=0,three=0,four=0,five=0; Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] types = new int[n+1]; for(int i=1; i <= n; i++){ types[i] = in.nextInt(); } for(int i=1; i <= n; i++){ if(types[i]==1) one=one+1; if(types[i]==2) two=two+1; if(types[i]==3) three=three+1; if(types[i]==4) four=four+1; if(types[i]==5) five=five+1; } int[] no = new int[n+1]; no[1]=one; no[2]=two; no[3]=three; no[4]=four; no[5]=five; int max=no[1]; int j=1; for(int i =1; i <= n;i++){ if(no[i]>max){ max=no[i]; j=i; } } System.out.println(j); } }