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 //total of each type of bird int one = 0; int two = 0; int three = 0; int four = 0; int five = 0; //go through the list for (int i = 0; i < n; i++){ int cur = types[i]; if(cur == 1){ one++; } else if (cur == 2){ two++; } else if (cur ==3){ three++; } else if (cur == 4){ four++; } else { five++; } } if(one >= two && one >= three && one >= four && one >= five){ System.out.println(1); } else if(two >= three && two >= four && two >= five){ System.out.println(2); } else if(three >= four && three >=five){ System.out.println(3); } else if(four >= five){ System.out.println(4); } else { System.out.println(5); } } }