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 in = new Scanner(System.in); int n = in.nextInt(); int[] height = new int[n]; for(int i = 0; imaxVal){ maxVal = height[i]; freq = 1; } else if(height[i]==maxVal){ freq++; } } System.out.println(freq); } }