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[] freq = new int[5]; 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){ freq[0] += 1; }else if(types[i] == 2){ freq[1] += 1; }else if(types[i] == 3){ freq[2] += 1; }else if(types[i] == 4){ freq[3] += 1; }else if(types[i] == 5){ freq[4] += 1; } } int max = 0; for(int i = 1; i freq[max]){ max = i; } } System.out.print(max+1); } }