#C9572. Count the Tallest Candles

    ID: 53680 Type: Default 1000ms 256MiB

Count the Tallest Candles

Count the Tallest Candles

You are given a cake with n candles. Each candle's height is given as an integer. Your task is to determine how many candles are the tallest on the cake.

In mathematical terms, if the heights are represented as \(a_1, a_2, \dots, a_n\), you need to compute the value

\(\text{count} = \#\{i \mid a_i = \max(a_1, a_2, \dots, a_n)\}\)

If there are no candles (i.e. \(n=0\)), the answer is 0.

inputFormat

The first line contains an integer \(n\) that denotes the number of candles. The second line contains \(n\) space-separated integers representing the heights of the candles. If \(n = 0\), the second line is omitted.

outputFormat

Output a single integer that represents the count of the tallest candles.

## sample
4
4 4 1 3
2