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]; int[] typ = new int[5]; for(int i=0; i < n; i++) { types[i] = in.nextInt(); } for(int i=0; i < n; i++) { switch(types[i]) { case 1: typ[0]++; break; case 2: typ[1]++; break; case 3: typ[2]++; break; case 4: typ[3]++; break; case 5: typ[4]++; break; default: ; } } int c = 0 ,k=-1; for(int i=0 ; i<5 ; i++) { if(typ[i] > c) { c = typ[i]; k = i; } } System.out.println(++k); } }