#include #include #define REP(i,N) for(int i=0,__i=N;i<__i;++i) long long __next; #define fibo_advance(a,b,c) \ __next=b+c;\ a=b;\ b=c;\ c=__next std::array a; bool input(){ REP(i,5) std::cin>>a[5-1-i]; return true; } int solve(){ using namespace std; long long n1=0,n2=0,n3=1; long long count=0,tmp; bool f_find=false; while(a[count]>n3){ fibo_advance(n1,n2,n3); } while(a[count]==n3){ count++; fibo_advance(n1,n2,n3); } return count; } int main(){ input(); int res=solve(); std::cout<