#include <bits/stdc++.h>
using namespace std;
vector<long long> d;
int main() {
  d.resize(91);
  d[0] = 1;
  d[1] = 2;
  for (int i = 2; i <= 90; i++) {
    d[i] = d[i - 1] + d[i - 2];
  }
  long long n;
  cin >> n;
  vector<long long>::iterator it = upper_bound(d.begin(), d.end(), n);
  int res = it - d.begin();
  res--;
  cout << res << endl;
}
