#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <cstring> #define mp make_pair #define pb push_back #define LL long long #define inf 2e9 #define zeros x^(x-1)&x using namespace std; int main() { LL x; cin>>x; if (x==1) { cout<<0; return 0; } LL a = 0; LL b = 1; LL c = 1; int nr = 1; while (c<x) { c = (a+b); a=b; b=c; nr++; } cout<<nr-1; return 0; }