import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] count = new int[6]; while(n-- > 0){ count[in.nextInt()]++; } in.close(); // your code goes here int max = 0; int maxIndex = 0; for(int i = 1; i < 6; i++){ if(max < count[i]){ max = count[i]; maxIndex = i; } } System.out.println(maxIndex); } }