#include <stdio.h>
int main()
{
int x1,x2,i,N,x;
scanf("%d",&N);
x1=1;
x2=1;
i=2;
while(x<=N)
{
x=x1+x2;
x1=x2;
x2=x;
i++;
}
printf("%d\n",i);
return 0;
}
#include <stdio.h>
int main()
{
int x1,x2,i,N,x;
scanf("%d",&N);
x1=1;
x2=1;
i=2;
while(x<=N)
{
x=x1+x2;
x1=x2;
x2=x;
i++;
}
printf("%d\n",i);
return 0;
}