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 _1=0; int _2=0; int _3=0; int _4=0; int _5=0; int max=0; for(int i:types){ if(i == 1){ _1++; if(max<_1){ max = _1; } } else if(i == 2){ _2++; if(max<_2){ max = _2; } } else if(i == 3){ _3++; if(max<_3){ max = _3; } } else if(i == 4){ _4++; if(max<_4){ max = _4; } } else{ _5++; if(max<_5){ max = _5; } } } int[] arr = {_1,_2,_3,_4,_5,}; for(int i=0; i<5; i++){ if(arr[i]==max){ System.out.println(i+1); break; } } } }