#C6224. Bursting Balloons

    ID: 49961 Type: Default 1000ms 256MiB

Bursting Balloons

Bursting Balloons

You are given a list of balloon heights. A single jump bursts all balloons if there is at least one balloon. In other words, if the list is non-empty, the maximum number of balloons burst in one jump is simply the number of balloons. If the list is empty, no balloons are burst.

More formally, let the sequence of balloon heights be \(a_1, a_2, \dots, a_n\). Then the answer is defined as follows:

\[ \text{answer} = \begin{cases} 0, & \text{if } n = 0, \\ n, & \text{if } n > 0. \end{cases} \]

Use this definition to compute the result.

inputFormat

The input is provided via standard input (stdin). The first line contains an integer (n) representing the number of balloons. The second line contains (n) space-separated integers which denote the heights of the balloons. If (n = 0), the second line may be empty.

outputFormat

Output a single integer to standard output (stdout) which is the maximum number of balloons that can be burst in a single jump.## sample

4
3 3 3 3
4

</p>