ваpackage com.javarush.task.task08.task0812;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
List<Integer> list = new ArrayList<>();
while (true) {
String s = reader.readLine();
if (s.isEmpty()) break;
list.add(Integer.parseInt(s));}
int max=1;
int count=1;
for(int i=0;i<9;i++){
if((list.get(i)).equals(list.get(i+1))){
count++;
if(max<=count){max=count;}
else if(max>count){ count = 1;}
}
}
System.out.println(max);
}
}
