#include <bits/stdc++.h>
using namespace std;
int main() {
  long long ourNum = 1, n, first = 0, second = 1, result, resultIndex = 0;
  cin >> n;
  while (n > ourNum) {
    result = first + second;
    ourNum += result;
    first = second;
    second = result;
    resultIndex++;
  }
  if (resultIndex == 46)
    cout << 45;
  else
    cout << resultIndex;
  return 0;
}
