import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int[] flocks = new int[6]; private static int maxFlockMember(int[] types) { // TODO Auto-generated method stub if(types.length == 0) return 0; int max = 0; for(int i = 0; i< types.length; i++){ flocks[types[i]] += 1; } for(int j = 1; j < flocks.length; j++){ if(flocks[max] < flocks[j]) max = j; } return max; } 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 System.out.println(maxFlockMember(types)); in.close(); } }