Module: Tasks for using the while loop


Problem

7 /9


The maximum number of equals in a row

Problem

You are given a sequence of natural numbers ending with the number 0. Determine the largest number of consecutive elements of this sequence that are equal to each other.

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 end).

Imprint 
Print the answer to the problem.
 

 

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