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 a = 0; //int[] types = new int[n];//don't need to store. can use int variable in the for loop instead of types array int[] count = {0,0,0,0,0};// for(int types_i=0; types_i < n; types_i++){ //types[types_i] = in.nextInt(); a = in.nextInt(); if(a==1){// count[0]++; } if(a==2){// count[1]++; } if(a==3){// count[2]++; } if(a==4){// count[3]++; } if(a==5){// count[4]++; } } // your code goes here int tempC = 0; int tempI = 0; for(int i = 1; i < 6; i++){ if(count[i-1]>tempC){ tempC = count[i-1]; tempI = i-1; } } System.out.println(tempI+1); } }