i=1
j=1
count=2
while(True):
count=count+1
temp=i+j
i=j
j=temp
L=list(str(temp))
if(len(L)>=1000):
print count
break
i=1
j=1
count=2
while(True):
count=count+1
temp=i+j
i=j
j=temp
L=list(str(temp))
if(len(L)>=1000):
print count
break