#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0;
  long long p = 1, q = 2, r, n;
  cin >> n;
  while (q <= n) {
    ans++;
    r = q;
    q = p + q;
    p = r;
  }
  printf("%d\n", ans);
  return 0;
}
