#include <stdio.h>
int Fibon1(int n){
if (n == 1 || n == 2){
return 1;
}
else{
return Fibon1(n - 1) + Fibon1(n - 2);
}
}
int main(){
int N,i=1;
scanf("%d",&N);
while(Fibon1(i)<N){
i++;
}
printf("%d",i);
return 0;
}
#include <stdio.h>
int Fibon1(int n){
if (n == 1 || n == 2){
return 1;
}
else{
return Fibon1(n - 1) + Fibon1(n - 2);
}
}
int main(){
int N,i=1;
scanf("%d",&N);
while(Fibon1(i)<N){
i++;
}
printf("%d",i);
return 0;
}