Module: (Python) Conditional loop statement - WHILE


Problem

20 /21


How many elements equal to the maximum

Problem

The sequence consists of natural numbers and ends with the number 0. Determine how many elements of this sequence are equal to its largest element.

Input 
A sequence of natural numbers is entered, ending with the number 0 (the number 0 itself is not included in the sequence, but serves as a sign of its termination).

Imprint 
Print the answer to the problem.
 

 

Examples
# Input Output
1 9
7
0
1
2 1
3
3
1
0
2