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