#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; scanf("%d",&n); int max ; scanf("%d",&max); int count = 1; int height; for(int i=1;i max) { max = height; count = 1; } else if(height == max) count++; } printf("%d\n",count); return 0; }