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 i = 0; i < n; i++){ birds[i] = in.nextInt(); } // your code goes here int[] types = new int[6]; // count birds for each type: for (int i = 0; i < n; i++) { types[birds[i]] += 1; } int maxType = 1; int cnt_maxType = types[1]; for (int i = 2; i < types.length; i++) { if (types[i] > cnt_maxType) { maxType = i; cnt_maxType = types[i]; } } System.out.println(maxType); } }