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