import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int height; int champ = Integer.MIN_VALUE; int count = 0; for (int i = 0; i < N; i++) { height = sc.nextInt(); if (height > champ) { champ = height; count = 1; } else if (height == champ) { count++; } } System.out.println(count); sc.close(); } }