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 scan = new Scanner(System.in); int n = scan.nextInt(); int[] h = new int[n]; int i=0,tall=0,tall_count=0; for(;i= tall) // a 'new' taller candle or more of the current tallest candle { if(h[i] > tall) // found a 'new' taller candle { tall = h[i]; tall_count = 1; } else tall_count++; // more than 1 tallest candles } } System.out.println(tall_count); } }