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 max = 0; int index = 0; int [] count_types = new int[5]; for (int i = 0; i< n ; i++) { if (types[i] == 1) count_types[0]++; else if (types[i] == 2) count_types[1]++; else if (types[i] == 3) count_types[2]++; else if (types[i] == 4) count_types[3]++; else if (types[i] == 5) count_types[4]++; } for (int j =0 ;j<5;j++) { if (count_types[j] > max) { max = count_types[j]; index = j; } } System.out.println(++index); } }