import java.util.Scanner; public class BirthdayCakeCandles { public static void main(String Args[]){ Scanner sc = new Scanner(System.in); int candles = sc.nextInt(); int[] height = new int[candles]; int big = 0, i, c = 0; for(i = 0; i < candles; i ++){ height[i] = sc.nextInt(); if(height[i] > big) big = height[i]; } for(i = 0; i < candles; i ++){ if(height[i] == big) c++; } System.out.println(c); sc.close(); } }