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(); // interesting min=0; int[] a = new int[5]; a[0]=1; a[1]=2; a[2]=3; a[3]=4; a[4]=5; int I=0,j=0,k=0,l=0,m=0; int[] types = new int[n]; for(int types_i=0; types_i < n; types_i++){ types[types_i] = in.nextInt(); //if(types_I==0) // if(types_I==0) // min=types[types_I]; // if(min==types[types_i]) // min++; // else //min= // if(types_I if(types[types_i]==a[0]) I++; if(types[types_i]==a[1]) j++; if(types[types_i]==a[2]) k++; // if(types[types_I]==a[3]) if(types[types_i]==a[3]) l++; if(types[types_i]==a[4]) m++; } int[] b = new int[5]; b[0]=I; b[1]=j; b[2]=k; b[3]=l; b[4]=m; int min=b[0]; int max=0; for(int i =0;i <5;i++) { if(b[i]>min) { min=b[i]; max=a[i]; } } System.out.println(max); // your code goes here } }