import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(reader.readLine()); int[] levels = new int[6]; String[] inputs = reader.readLine().split(" "); for (int i = 0; i < N; i++) { levels[Integer.parseInt(inputs[i]) - 1] += 1; } int max = levels[0]; int level=0; for (int i = 1; i < 6; i++) { if (max <= levels[i]) { max = levels[i]; level = i; } } System.out.println(level+1); } }