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]; types[1] = 0; types[2] = 0; types[3] = 0; types[4] = 0; types[5] = 0; for(int types_i=0; types_i < n; types_i++){ types[in.nextInt()]++; } int largest = 0; int type = 0; for(int i = 1; i<=5; i++){ if(types[i] > largest) { largest = types[i]; type = i; } } System.out.println(type); } }