import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), max = 0, t; int[] m = new int[7]; for(int i = 0; i < n; i++){ t = sc.nextInt(); m[t]++; max = Math.max(max, m[t]); } for(int i = 6; i > 0; i--){ if(m[i] == max){ System.out.println(i); return; } } } }