age = input(); heights = input(); top = max(heights.split(' ')) print(heights.count(top));