#include <bits/stdc++.h>   using namespace std;   int main() {     long long n;     cin >> n;     vector<long long> dp;     dp.push_back(0);     dp.push_back(1);     while (dp.back() <= n - 1) {       dp.push_back(dp[dp.size() - 1] + dp[dp.size() - 2] + 1);     }     cout << dp.size() - 2 << endl;   }   