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