#include <bits/stdc++.h>
using namespace std;
template <typename T>
T POW(T b, T p) {
  T r = 1;
  while (p) {
    if (p & 1) r = (r * b);
    b = (b * b);
    p >>= 1;
  }
  return r;
}
template <typename T>
T BigMod(T b, T p, T m) {
  T r = 1;
  while (p) {
    if (p & 1) r = (r * b) % m;
    b = (b * b) % m;
    p >>= 1;
  }
  return r;
}
int main() {
  long long n, a, b, c, cnt;
  while (cin >> n) {
    a = 1;
    b = 1;
    cnt = 0;
    while (1) {
      c = a + b;
      a = b;
      b = c;
      if (c <= n)
        cnt++;
      else
        break;
    }
    cout << cnt << endl;
  }
}
