pleasss help me 😭.
package com.codegym.task.task08.task0812;
import java.io.*;
import java.util.ArrayList;
/*
Longest sequence
*/
public class Solution {
public static void main(String[] args) throws IOException {
//write your code here
ArrayList<Integer> list = new ArrayList<Integer>();
BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
for(int i=0; i<10; i++){
String s = x.readLine();
Integer n = Integer.parseInt(s);
list.add(n);
}
int count = 1;
int max = 1;
for(int j=0; j<10-1; j++){
if(list.get(j) == list.get(j+1))
count++;
else {
if(count>max) max = count;
count = 1; }
} System.out.println(max);
}
}