import java.util.Scanner; public class Main_yukicoder79 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] lc = new int[6]; for (int i = 0; i < n; i++) { int l = sc.nextInt() - 1; lc[l]++; } int max = 0; int maxi = 0; for (int i = 5; i >= 0; i--) { if (lc[i] > max) { max = lc[i]; maxi = i + 1; } } System.out.println(maxi); sc.close(); } }