#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a vs; vs.emplace_back(1); vs.emplace_back(1); while(vs.back()<1e17){ Int n=vs.size(); vs.emplace_back(vs[n-1]+vs[n-2]); } const Int m=5; vector as(m); for(Int i=0;i>as[i]; reverse(as.begin(),as.end()); Int n=vs.size(); Int ans=0; for(Int i=0;i=n or vs[i+j]!=as[j]) break; res++; } chmax(ans,res); } cout<