#include <bits/stdc++.h>
const int inf_int = 2e9;
const long long inf_ll = 2e18;
const int maxn = 5e2 + 10;
using namespace std;
inline int read() {
  int ra, fh;
  char rx;
  rx = getchar(), ra = 0, fh = 1;
  while ((rx < '0' || rx > '9') && rx != '-') rx = getchar();
  if (rx == '-') fh = -1, rx = getchar();
  while (rx >= '0' && rx <= '9') ra *= 10, ra += rx - 48, rx = getchar();
  return ra * fh;
}
long long gcd(long long p, long long q) { return q == 0 ? p : gcd(q, p % q); }
long long qpow(long long p, long long q) {
  long long f = 1;
  while (q) {
    if (q & 1) f = f * p;
    p = p * p;
    q >>= 1;
  }
  return f;
}
long long n;
long long a, b, re, t;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (a = 1, b = 2; n >= b; re++) t = a, a = b, b += t;
  cout << re << endl;
  return 0;
}
