h;j;k;q[];main(i){for(;h>199?i+=k>99?k=i>149?h=j=!printf("%d\n",k-i+j):0,++j-i:q[i]==q[k++]:~scanf("%d",q+h++););}