import java.math.*; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t= sc.nextInt(); for(int i=0;i matu = new HashMap<>(); for(int j=0;j entries = new ArrayList(matu.entrySet()); Collections.sort(entries, new Comparator(){ public int compare(Object o1, Object o2){ Map.Entry e1 =(Map.Entry)o1; Map.Entry e2 =(Map.Entry)o2; return -((Integer)e1.getValue()).compareTo((Integer)e2.getValue()); } }); for(Map.Entry b: entries ){ matu.put((Integer)b.getKey(), matu.get((Integer)b.getKey())-1); if(count==3) break; count++; } Object[] aaa = matu.keySet().toArray(); for(Object aa:aaa){ if(matu.get(aa)==0) matu.remove(aa); } } System.out.println(ans); } } }