import java.util.Scanner; public class Yukicoder79 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(), max = -1, maxIndex = 0; int[] count = new int[6]; for (int i = 0; i < N; i++) count[sc.nextInt()-1]++; for (int i = 0; i < 6; i++){ if (count[i] >= max) { max = count[i]; maxIndex = i+1; } } System.out.println(maxIndex); } }