#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, a, b, c = 0, f, s;
  cin >> n;
  f = 1;
  s = 2;
  while (s <= n) {
    a = f + s;
    f = s;
    s = a;
    c++;
  }
  cout << c << endl;
  return 0;
}
