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[] birds = new int[n]; for(int types_i=0; types_i < n; types_i++){ birds[types_i] = in.nextInt(); } int[] arr = new int[5]; for (int i = 0; i < 5; i++) { arr[i] = 0; } for (int i = 0; i < n; i++) { switch (birds[i]) { case 1: arr[0]++; break; case 2: arr[1]++; break; case 3: arr[2]++; break; case 4: arr[3]++; break; case 5: arr[4]++; break; } } int max = arr[4]; int max_i = 4; for (int i = 3; i >= 0; i--) { if (arr[i] >= max) { max = arr[i]; max_i = i; } } System.out.println(max_i+1); } }