import java.util.Scanner; public class Solution { public static void main(String arg[]) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int types[] = new int[5]; for(int i = 0; i < n; i++) { types[in.nextInt()-1]++; } int max = Integer.MIN_VALUE; for(int i = 0; i < 5; i++) { max = Math.max(max, types[i]); } for(int i = 0; i < 5; i++) { if(types[i] == max) { System.out.println(i+1); return; } } } }