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]; int t1=0,t2=0,t3=0,t4=0,t5=0; for(int types_i=0; types_i < n; types_i++){ types[types_i] = in.nextInt(); } for(int i = 0; i < types.length; i++){ if(types[i] == 1) t1++; if(types[i] == 2) t2++; if(types[i] == 3) t3++; if(types[i] == 4) t4++; if(types[i] == 5) t5++; } if(t1 >= t2 && t1 >= t3 && t1 >= t4 && t1 >= t5 ) System.out.println("1"); if(t2 > t1 && t2 >= t3 && t2 >= t4 && t2 >= t5) System.out.println("2"); if(t3 > t1 && t3 > t2 && t3 >= t4 && t3 >= t5) System.out.println("3"); if(t4 > t1 && t4 > t2 && t4 > t3 && t4 >= t5) System.out.println("4"); if(t5 > t1 && t5 > t2 && t5 > t3 && t5 > t4) System.out.println("5"); // your code goes here } }