import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] level = new int[7]; for(int i = 0 ; i < n ; i++) { int temp = sc.nextInt(); level[temp]++; } int ans = -1; int cnt = -1; for(int i = 1 ; i < 7 ; i++) { if(cnt <= level[i]) { cnt = level[i]; ans = i; } } System.out.println(ans); } }