import java.util.Arrays; import java.util.Scanner; public class birds { public static void main(String[] args){ Scanner eggo = new Scanner(System.in); int y= Integer.parseInt(eggo.nextLine()); int[] birds=new int[y]; String[] all = eggo.nextLine().split(" "); for(int i=0;imode){ mode=curmode; modeval=curval; } curval=u; curmode=1; } else curmode++; } if(curmode>mode) modeval=curval; System.out.println(modeval); } }