#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  unsigned long long n;
  cin >> n;
  unsigned long long a = 1, b = 2, c = 1;
  while (b <= n) {
    c++;
    b = a + b;
    a = b - a;
  }
  cout << c - 1 << "\n";
}
