import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static int[] countArray; private static int count(int[] types){ countArray = new int[5]; for(int i : types){ countArray[i-1] += 1; } //Finding Largest count int max = countArray[0]; int type = 0; for(int i=1; i<5; i++){ if(max < countArray[i]){ max = countArray[i]; type = i; } } return type+1; } 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(count(types)); } }