on the distant planet XB-103, a research robot geologist collects samples of minerals from the conveyor tape. Each type of mineral has its own unique numerical identifier (ID). The robot control system should work as efficiently as possible, therefore, to optimize the storage of the robot, it is necessary to transfer only one number to the central computer at the end of the shift: what was the maximum length of the continuous series of samples of the same type. The shift of the robot ends when a special calibration sample with ID is 0.
rn
you are given a sequence of numerical minerals of minerals. The sequence always ends with the number 0, which means the end of the shift and is not the ID of the mineral. Determine the largest number of the same IDs in a row in this sequence.
Input format
Entire natural numbers are introduced, each from a new line. The sequence ends with the number 0.
Output format
One number & mdash; The maximum length of the continuous sequence of the same elements.
Hint
There will be no clue here, decide for yourself!