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) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner s = new Scanner(System.in); long n = s.nextLong(); long m = 0; long maxN = 0; long count = 0; for(long i=0; i maxN){ maxN = m; count = 1; }else if(m == maxN){ count++; } } System.out.println(count); } }