#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n;
  cin >> n;
  unsigned long long prev = 0, next = 1, x = 0;
  while (next <= n) {
    unsigned long long t = prev;
    prev = next;
    next += t;
    x++;
  }
  cout << x - 2 << endl;
  return 0;
}
