import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final int SIZE = 6; final int N = sc.nextInt(); int[] counts = new int[SIZE]; for(int i = 0; i < N; i++){ counts[sc.nextInt() - 1]++; } int max = 0; for(int i = 0; i < SIZE; i++){ if(counts[max] <= counts[i]){ max = i; } } System.out.println(max + 1); } }