#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long A = 1, B = 1;
  long long ans = 0;
  while (A <= n) {
    long long C = A + B;
    B = A;
    A = C;
    ans++;
  }
  cout << ans - 1 << endl;
  return 0;
}
