#include <iostream>
using namespace std;
long long a[100],n;
int main() {
cin >> n;
a[1]=2;
a[2]=3;
for(int i=3;i<=100;i++){
a[i]=a[i-1]+a[i-2];
}
int i=1;
while(a[i+1]<=n) i++;
cout<<i;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpsb25nIGxvbmcgYVsxMDBdLG47CmludCBtYWluKCkgewoJY2luID4+IG47CglhWzFdPTI7CglhWzJdPTM7Cglmb3IoaW50IGk9MztpPD0xMDA7aSsrKXsKCQlhW2ldPWFbaS0xXSthW2ktMl07Cgl9CglpbnQgaT0xOwoJd2hpbGUoYVtpKzFdPD1uKSBpKys7Cgljb3V0PDxpOwoJcmV0dXJuIDA7Cn0=