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