import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] l = new int[6]; int n = sc.nextInt(); for(int i = 0; i < n; i++) { l[sc.nextInt()-1]++; } int MAX = 0; int id = 5; for(int i = 0; i < 6; i++) { if(MAX <= l[i]) { MAX = l[i]; id = i; } } System.out.println((id+1)); } }