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[] t = new int[n]; int i,m=0,a=0; int f[]={0,0,0,0,0}; for(i=0; i < n; i++){ t[i] = in.nextInt(); } for(i=0; i < n; i++){ f[t[i]-1]++; } for(i=0;i<5;i++){ if(f[i]>m){ m=f[i]; a=i; } } System.out.println(a+1); // your code goes here } }