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); long n = in.nextLong(); long types,c1=0,c2=0,c3=0,c4=0,c5=0; for(long types_i=0; types_i < n; types_i++){ types = in.nextInt(); switch((int)types) { case 1:c1++; break; case 2:c2++; break; case 3:c3++; break; case 4:c4++; break; case 5:c5++; break; } } if(c1>=c2&&c1>=c3&&c1>=c4&&c1>=c5) System.out.println(1); else if(c2>=c1&&c2>=c3&&c2>=c4&&c2>=c5) System.out.println(2); else if(c3>=c2&&c3>=c1&&c3>=c4&&c3>=c5) System.out.println(3); else if(c4>=c2&&c4>=c3&&c4>=c1&&c4>=c5) System.out.println(4); else System.out.println(5); // your code goes here; } }