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 one = 0; int two = 0; int three = 0; int four = 0; int five = 0; for(int k: types) { if (k == 1) { one++; } else if (k == 2) { two++; } else if (k == 3) { three++; } else if (k == 4) { four++; } else { five++; } } System.out.print(mx(one, two, three, four, five)); } static int mx(int one, int two, int three, int four, int five) { int[] kn = {one, two, three, four, five}; int max = Integer.MIN_VALUE; for(int h: kn) { if (h > max) { max = h; } } if (max == one) { return 1; } else if (max == two) { return 2; } else if (max == three) { return 3; } else if (max == four) { return 4; } else { return 5; } } }