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]; for(int types_i=0; types_i < n; types_i++){ types[types_i] = in.nextInt(); } // your code goes here int type1 = 0; int type2 = 0; int type3 = 0; int type4 = 0; int type5 = 0; for(int i = 0; i < types.length; i++){ if(types[i] == 1){ type1++; }else if(types[i] == 2){ type2++; }else if(types[i] == 3){ type3++; }else if(types[i] == 4){ type4++; }else{ type5++; } } if(type1 >= type2 && type1 >= type3 && type1 >= type4 && type1 >= type5){ System.out.println("1"); }else if(type2 > type1 && type2 >= type3 && type2 >= type4 && type2 >= type5){ System.out.println("2"); }else if(type3 > type1 && type3 > type2 && type3 >= type4 && type3 >= type5){ System.out.println("3"); }else if(type4 > type1 && type4 > type2 && type4 > type3 && type4 >= type5){ System.out.println("4"); }else{ System.out.println("5"); } } }