include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
const int N=1e5+5;
int a[N],s[N];//s数组用于记录个数
int main(){
int n,res=0;
cin>>n;
for(int i=0;i[HTML_REMOVED]>a[i];
for(int i=0,j=0;i[HTML_REMOVED]1){
s[a[j]]–;
j++;
}
res=max(res,i-j+1);
}
cout<<res<<endl;
return 0;
}