import java.util.Scanner; public class CutSticks { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[6]; for (int i = 0; i < n; i++) arr[sc.nextInt()]++; int max = 0; int num = 5; for (int i = 5; i > 0; i--) { if (arr[i] >= max) { max = arr[i]; num = i; } } System.out.println(num); } }