#include int n,x,a[9999],v=1,i,j;main(){std::cin>>n>>a[0];for(i=1;i>a[i];if(i>=2&&a[i]+a[i-2]==a[i-1]*2)x++;else x=2;v=std::max(v,x);}std::cout<