import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private final static int TYPE_SIZE = 5; public static void main(String[] args) { Scanner in = new Scanner(System.in); int count = in.nextInt(); int[] counter = new int[TYPE_SIZE]; for(int idx=0; idx < count; idx++){ int type = in.nextInt(); counter[type - 1] += 1; } int maxType = 0; int maxCount = 0; for (int type = 0; type < TYPE_SIZE; type++) { if (counter[type] > maxCount) { maxType = type; maxCount = counter[type]; } } System.out.println(maxType + 1); } }