You are in charge of the cake for a child's birthday.  You have decided the cake will have one candle for each year of their total age. They will only be able to blow out the tallest of the candles. Count how many candles are tallest. 

Example  

$candles=[4,4,1,3]$

The maximum height candles are $4$ units high.  There are $2$ of them, so return $2$.

Function Description

Complete the function birthdayCakeCandles in the editor below.  

birthdayCakeCandles has the following parameter(s):

int candles[n]: the candle heights     

Returns  

int: the number of candles that are tallest

Input Format

The first line contains a single integer, $n$, the size of $\textit{candles[]}$. 

The second line contains $n$ space-separated integers, where each integer $\boldsymbol{i}$ describes the height of $\textit{candles}[i]$.

Constraints

$1\leq n\leq10^5$  
$1\leq\textit{candles}[i]\leq10^7$  

Sample Input 0
4
3 2 1 3

Sample Output 0
2

Explanation 0

Candle heights are $[3,2,1,3]$.  The tallest candles are $3$ units, and there are $2$ of them.

Difficulty: EASY

Solutions:
N = int(input())
V = list(map(int, input().split()))
print(V.count(max(V)))


N = int(input().strip())
A = input().strip().split()
for i in range(len(A)):
	A[i] = int(A[i])
maximum = max(A)
count = 0
for i in A:
	if i == maximum:
		count += 1
print(count)


n = int(input())
height_i = [int(x) for x in input().split(' ')]
(max_num, max_count) = (0, 0)
for height in height_i:
	if height == max_num:
		max_count += 1
	elif height > max_num:
		max_num = height
		max_count = 1
print(max_count)


n = int(input())
lis = list(map(int, input().split()))
maximum = lis[0]
for i in range(len(lis)):
	if lis[i] > maximum:
		maximum = lis[i]
print(lis.count(maximum))


n = int(input())
s = input().split()
l = []
for i in s:
	l.append(int(i))
soma = 0
maior = max(l)
for i in l:
	if i == maior:
		soma += 1
print(soma)


N = input()
arr = list(map(int, input().split()))
max_ = max(arr)
L = [i for i in arr if i == max_]
print(len(L))


def candle(num_of_candles, candles):
	tallest_candle = 0
	count = 0
	if int(num_of_candles) >= 1 and int(num_of_candles) <= 10 ** 5:
		for i in candles:
			if int(i) >= 1 and int(i) <= 10 ** 7:
				if int(i) > tallest_candle:
					tallest_candle = int(i)
		for i in candles:
			if int(i) >= 1 and int(i) <= 10 ** 7:
				if int(i) == tallest_candle:
					count += 1
		print(count)
num_of_candles = input()
candles = input()
list_of_candles = candles.split()
candle(num_of_candles, list_of_candles)


n = input().strip()
h = [int(i) for i in input().strip().split(' ')]
print(str(h.count(max(h))))


n = int(input())
a = list(map(int, input().split(' ')))
m = max(a)
print(sum([1 for _ in a if _ == m]))


import sys
n = int(input().strip())
a = [int(el) for el in input().strip().split()]
a.sort()
print(a.count(a[len(a) - 1]))


def blow_candles(height_of_candles):
	max_size = 0
	num_of_candles = 0
	for candle in height_of_candles:
		if candle > max_size:
			max_size = candle
			num_of_candles = 1
		elif candle == max_size:
			num_of_candles += 1
	return num_of_candles
candles = int(input())
height_of_candles = list(map(int, input().split()))
print(blow_candles(height_of_candles))


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)


input()
arr = [int(i) for i in input().split()]
print(arr.count(max(arr)))


n = input().strip()
arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
max = -1
count = 0
for x in range(0, len(arr)):
	if x == 0:
		max = arr[x]
		count += 1
	elif arr[x] > max:
		max = arr[x]
		count = 1
	elif arr[x] == max:
		count += 1
print(count)


n = int(input())
candles = list(map(int, input().split()))
tallest = max(candles)
print(candles.count(tallest))


n = input()
l = list(map(int, input().split()))
m = max(l)
print(l.count(m))


n = int(input())
a = input().split()
for i in range(len(a)):
	a[i] = int(a[i])
a.sort()
a.reverse()
print(a.count(a[0]))


from collections import Counter
n = int(input())
i = input().split(' ')
i = [int(x) for x in i]
x = max(i)
c = Counter(i)
print(c[x])


from collections import Counter
n = int(input().strip())
c = Counter(list(map(int, input().strip().split()))[:n])
print(max(c.values()))


n = int(input())
t = input().split()
max1 = 0
count = 0
for i in range(n):
	x = int(t[i])
	if x > max1:
		max1 = x
		count = 1
	elif x == max1:
		count = count + 1
print(count)


num = int(input())
candles = input().split()
candles = list(map(int, candles))
highest = max(candles)
count = 0
for i in range(len(candles)):
	if candles[i] == highest:
		count += 1
print(count)


n = int(input())
cands = list(map(int, input().split(' ')))
m = max(cands)
print(cands.count(m))


n = input()
candles = [int(x) for x in input().split(' ')]
print(candles.count(max(candles)))


n = int(input().strip())
candles = list(map(int, input().strip().split()))
high_num = 0
for x in candles:
	if x > high_num:
		high_num = x
print(candles.count(high_num))


num_candles = int(input())
candles = input().split(' ')
candles = [int(x) for x in candles]
max_height = -1
count = 0
for i in candles:
	if i > max_height:
		max_height = i
		count = 1
	elif i == max_height:
		count += 1
print(count)


input()
res = []
mx = -1
for i in map(int, input().split()):
	if i > mx:
		mx = i
		res = [i]
	elif i == mx:
		res.append(i)
print(len(res))


a = input()
b = list(map(int, input().split()))
max = 0
counter = 0
for x in range(0, len(b)):
	if b[x] > max:
		max = b[x]
for x in range(0, len(b)):
	if b[x] == max:
		counter += 1
print(counter)


candles = int(input())
candles_height = [int(x) for x in input().strip().split()]
height = candles_height[0]
counter_candles = 0
for candle_height in candles_height:
	if candle_height > height:
		counter_candles = 1
		height = candle_height
	elif candle_height == height:
		counter_candles += 1
print(counter_candles)


n = input()
h = [int(i) for i in input().split(' ')]
m = max(h)
print(sum((i == m for i in h)))


n = int(input())
imx = 0
c_height = [int(i) for i in input().split()]
imx = max(c_height)
print(c_height.count(imx))


n = int(input())
candle_input = input()
candles = candle_input.split(' ')
candle_string = []
for i in candles:
	candle_string.append(int(i))
height = max(candle_string)
print(candle_string.count(height))


n = int(input())
l = input().split()
lint = []
for i in l:
	lint.append(int(i))
lint.sort()
count = 0
for i in lint[::-1]:
	if i == lint[n - 1]:
		count += 1
	else:
		break
print(count)


n = int(input())
s = []
s[0:] = map(int, input().split())
m = max(s)
print(s.count(m))


n = int(input().strip())
arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
maxHeight = 0
count = 0
for i in range(0, n):
	if arr[i] == maxHeight:
		count += 1
	elif arr[i] > maxHeight:
		count = 1
		maxHeight = arr[i]
print(count)


input()
nums = list(map(int, input().strip().split()))
m = max(nums)
print(len([x for x in range(len(nums)) if nums[x] == m]))


n = int(input())
arr = list(map(int, input().strip().split(' ')))
maxa = max(arr)
print(arr.count(maxa))


input()
lst = input().split(' ')
counts = {}
for _ in lst:
	if _ in counts:
		counts[_] += 1
	else:
		counts[_] = 1
print(sorted(counts.values())[-1])


n = int(input())
a = list(map(int, input().split()))
m = max(a)
count = 0
for i in range(n):
	if a[i] == m:
		count = count + 1
print(count)


input()
candles = list(map(int, input().split()))
print(candles.count(max(candles)))


N = int(input())
candles = list(map(int, input().split()))
tall = max(candles)
print(candles.count(tall))


n = int(input()) - 1
candles = input().split()
candles = [int(i) for i in candles]
heighest = max(candles)
count = 0
while n >= 0:
	if heighest == candles[n]:
		count += 1
	n -= 1
print(count)


n = int(input())
inparr = input()
height = inparr.split(' ')
max = 0
count = 0
for j in range(n):
	if int(height[j]) > max:
		max = int(height[j])
	else:
		continue
for k in range(n):
	if int(height[k]) == max:
		count = count + 1
	else:
		continue
print(count)


import sys
n = int(input().strip())
candles = [int(x) for x in input().strip().split()]
tallest = 0
tallest_count = 0
for x in candles:
	if x > tallest:
		tallest = x
		tallest_count = 1
	elif x == tallest:
		tallest_count += 1
print(tallest_count)


input()
candles = [int(candle) for candle in input().split(' ')]
max_height = 0
count = 0
for candle in candles:
	if candle > max_height:
		max_height = candle
		count = 1
	elif candle == max_height:
		count += 1
print(count)


n = input()
inp = input().split()
count = 0
inp = [int(i) for i in inp]
inp.sort(reverse=True)
big = inp[0]
for j in inp:
	if j == big:
		count += 1
print(count)


n = int(input())
heights = [int(x) for x in input().strip().split(' ')]
maxs = heights[0]
nums = 0
change = False
for i in range(n):
	if heights[i] > maxs:
		maxs = heights[i]
		nums = 0
		change = False
	if heights[i] == maxs and (not change):
		nums += 1
print(nums)


n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
m = max(height)
print(height.count(m))


n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
counter = 0
tallest = height[0]
for i in range(n):
	if height[i] == tallest:
		counter += 1
	elif height[i] > tallest:
		tallest = height[i]
		counter = 1
print(counter)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
maximum = max(height)
print(height.count(maximum))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
height.sort()
highest = height[-1]
print(height.count(highest))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]

def candle(n, height):
	num = 0
	max_height = max(height)
	for h in height:
		if h == max_height:
			num += 1
	return num
print(candle(n, height))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
max_h = height[0]
num_max = 0
for i in height:
	if i > max_h:
		max_h = i
		num_max = 1
	elif i == max_h:
		num_max += 1
print(num_max)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
count = 0
maxima = max(height)
for i in height:
	if i == maxima:
		count += 1
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
max = 0
count = 0
for cand in height:
	if cand > max:
		max = cand
		count = 1
	elif cand == max:
		count += 1
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
candleMap = {}
for candle in height:
	if candle in candleMap:
		candleMap[candle] = candleMap[candle] + 1
	else:
		candleMap[candle] = 1
print(int(candleMap[max(candleMap.keys())]))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
a = max(height)
print(len([x for x in height if x == a]))


import sys
age = input()
heights = input()
heights = heights.split(' ')
heights = map(int, heights)
tallestCandle = 1
candlesBlown = 0
for i in heights:
	if i == tallestCandle:
		candlesBlown += 1
	elif i > tallestCandle:
		tallestCandle = i
		candlesBlown = 1
print(candlesBlown)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
tallest = max(height)
print(sum((h == tallest for h in height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
k = max(height)
print(height.count(k))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
m = max(height)
print(sum((1 for x in height if x == m)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
maxheight = max(height)
count = 0
for i in height:
	if maxheight == i:
		count += 1
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
max_height = 0
candle_cnt = 0
for h in height:
	if h == max_height:
		candle_cnt += 1
	elif h > max_height:
		candle_cnt = 1
		max_height = h
print(candle_cnt)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
sh = sorted(height, reverse=True)
n_c = 1
i = 1
while i < n and sh[i] == sh[0]:
	n_c += 1
	i += 1
print(n_c)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
height.sort()
print(height.count(height[-1]))


n = int(input().strip())
heights = list(map(int, input().strip().split(' ')))
print(heights.count(max(heights)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
m = max(height)
print(sum([i == m for i in height]))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
tallest = 0
for h in height:
	if h > tallest:
		tallest = h
count = 0
for h in height:
	if h == tallest:
		count += 1
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
tallest = max(height)
print(height.count(tallest))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
height.sort()
height.reverse()
val = height[0]
count = 0
for i in height:
	if i == val:
		count += 1
	else:
		break
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
max = 0
output = []
for i in range(n):
	if height[i] > max:
		max = height[i]
for x in height:
	if x == max:
		output.append(x)
print(len(output))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
ht = {}
maxer = 0
for i in range(0, len(height)):
	item = str(height[i - 1])
	if height[i - 1] > maxer:
		maxer = height[i - 1]
	if ht.get(item) is None:
		ht[item] = 1
	else:
		ht[item] = int(ht[item]) + 1
print(ht.get(str(maxer)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
occurences = 0
max_height = None
for candle in height:
	if max_height == None:
		max_height = candle
		occurences = 1
	elif max_height == candle:
		occurences += 1
	elif max_height < candle:
		max_height = candle
		occurences = 1
print(occurences)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
tallest_candle = max(height)
print(height.count(tallest_candle))


import sys
n = int(input().strip())
heights = [int(height_temp) for height_temp in input().strip().split(' ')]
num_of_heights = {}
for height in heights:
	try:
		num_of_heights[height]
	except KeyError:
		num_of_heights[height] = 0
	num_of_heights[height] += 1
max = 0
for key in num_of_heights.keys():
	if num_of_heights[key] > max:
		max = num_of_heights[key]
print(max)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
num_max = 0
max_height = 0
for val in height:
	if val > max_height:
		max_height = val
for val in height:
	if val == max_height:
		num_max += 1
print(num_max)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
max_height = max(height)
print(height.count(max_height))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
largest = 0
for i in height:
	if i > largest:
		largest = i
count = 0
for i in height:
	if largest == i:
		count += 1
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
height.sort()
tallest = height[len(height) - 1]
print(height.count(tallest))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
tallest = -1
candles = 0
for hh in height:
	if hh == tallest:
		candles += 1
	elif hh > tallest:
		candles = 1
		tallest = hh
	else:
		0
print(candles)


import sys
n = int(input().strip())
heights = [int(height_temp) for height_temp in input().strip().split(' ')]
max_height = max(heights)
count = 0
for candle in heights:
	if candle == max_height:
		count += 1
print(count)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
m = max(height)
c = 0
for i in height:
	if i == m:
		c += 1
print(c)


X = eval(input())
a = [int(n) for n in input().strip().split(' ')]
z = max(a)
print(a.count(z))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
max_item = max(height)
print(height.count(max_item))


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
result = height.count(max(height))
print(result)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
height.sort()
max = height[-1]
m = height.count(max)
print(m)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
m = max(height)
y = height.count(m)
print(y)


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
nums = {}
for x in height:
	if x not in nums:
		nums[x] = 1
	else:
		nums[x] += 1
out = max(nums)
print(nums[out])


import sys
n = int(input().strip())
height = [int(height_temp) for height_temp in input().strip().split(' ')]
print(height.count(max(height)))