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 a= 0, b= 0, c=0,d=0,e=0; int max= 0; for(int i = 0; i < types.length; i++){ if (types[i] == 1) a++; if (types[i] == 2) b++; if (types[i] == 3) c++; if (types[i] == 4) d++; if (types[i] == 5) e++; } int maxi = Math.max(a,Math.max(b,Math.max(c,Math.max(d,e)))); if(a>=b && a>=c && a>=d && a >=e){ System.out.print(1); } else if(b>=a && b>=c && b>=d && b >=e){ System.out.print(2); } else if(c>=b && c>=a && c>=d && c >=e){ System.out.print(3); } else if(d>=b && d>=c && d>=a && d >=e){ System.out.print(4); } else if(e>=b && e>=c && e>=d && e >=a){ System.out.print(5); } else System.out.print(1); } }