#include <stdio.h>
int main(){
int n,sum=1,k=1,x=0,y=1;
scanf("%d",&n);
while(sum<n){
sum=x+y;
x=y;
y=sum;
k++;
}
printf("%d",k);
return 0;
}
//x y s
//0 1 1 2 3 5 8
#include <stdio.h>
int main(){
int n,sum=1,k=1,x=0,y=1;
scanf("%d",&n);
while(sum<n){
sum=x+y;
x=y;
y=sum;
k++;
}
printf("%d",k);
return 0;
}
//x y s
//0 1 1 2 3 5 8