public class Solution {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        ArrayList<Integer> list = new ArrayList<Integer>();
        ArrayList<Integer> list2 = new ArrayList<Integer>();
        for (int i = 0; i < 10; i++){
            list.add(Integer.parseInt(reader.readLine()));
        }
        for (int i = 0; i < list.size(); i++){
            int count = 0;
            for (int j = i; j < list.size(); j++) {
                while (true) {
                    if (list.get(i) == list.get(j)) {
                        count++;
                    }
                    else break;
                }
                list2.add(count);
            }

        }

        Collections.sort(list2);
        System.out.println(list2.get(list2.size() - 1));

    }
}