#include int main() { int n,i,j,p=0,count=0; scanf("%d",&n); int a[n],b[1001]={0}; for(i=0;ip) p=count; i=i+b[a[i]]; } printf("%d\n",p); return 0; }