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 typeCount[] = new int[5]; int[] types = new int[n]; int max=0; for(int i=0; i < n; i++){ types[i] = in.nextInt(); typeCount[types[i]-1]++; } max=0; for(int i = 1; i<5; i++) { if(typeCount[i]>typeCount[max]) max=i; } System.out.print(max+1); // your code goes here } }