i don't interstand why my code do not validate all the task?
package fr.codegym.task.task08.task0812;
import java.io.*;
import java.util.ArrayList;
/*
La plus longue séquence
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader saisie = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> liste = new ArrayList<Integer>();
for(int i = 0; i<10; i++) {
int x = Integer.parseInt(saisie.readLine());
liste.add(x);
}
int compte = 0;
int topDepart = liste.get(0);
int max = 0;
for(int i : liste) {
if(i == topDepart){
compte += 1;
if (compte > max) {
max = compte;
}
} else {
topDepart =i;
}
}
System.out.println(max-1);
}
}