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 sc = new Scanner(System.in); int n = sc.nextInt(); int[] candles = new int[n]; int max=-1; int count=0; for(int n0=0; n0max){ max = candles[n0]; count = 1; } else if(candles[n0]==max){ count++; } } System.out.println(count); } }