import java.io.IOException;
import java.util.*;

/*
Cамая длинная последовательность
*/
public class Solution {
    public static void main(String[] args) throws IOException {
        //напишите тут ваш код
        Scanner scanner  = new Scanner(System.in);
        List<Integer> arrayList = new ArrayList<>();
        for (int i = 0; i <10 ; i++) {
            arrayList.add(scanner.nextInt());
        }
       int count = 0;
        int temp = 0;
        for (int i = 1; i < arrayList.size(); i++) {
            if (arrayList.get(i-1).equals(arrayList.get(i))){
                temp++;
            }else{
                if (temp>=count){
                    count=temp;
                    temp=0;
                }
            }

        }
        if (temp>count){
            count=temp;
            System.out.println(count+1);
        }
        else System.out.println(count+1);
     }
}