#include int x,a[9999],v=1,*p=a,*q=p+2;main(){for(;~scanf("%d",++p);)x=p-q>1&&*p+*q==*++q*2?x+1:p-q+1,v=v