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(); if(n>=2 && n<=2e5){ int[] type = new int[]{0,0,0,0,0}; int[] types = new int[n]; for(int types_i=0; types_i < n; types_i++){ int tp = in.nextInt(); types[types_i] = tp; type[tp-1]++; } int most = 0; int same = 0; for(int x=0; x < 5; x++){ if(most < type[x]){ most = type[x]; same = x+1; } } System.out.println(same); } // your code goes here } }