import sys buf = [] while True: line = sys.stdin.readline().strip('\n') if line: buf.append(line) else: break if buf: n = int(buf[0]) heights = [] words = buf[1].split() for m in words: heights.append(int(m)) tallest = max(heights) index = 0 for m in heights: if m == tallest: index += 1 print(index)