#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18;
const long long int MAX = 1e6 + 2;
int32_t main() {
  long long int n;
  cin >> n;
  long long int a = 1, b = 2, c = 0, i = 0;
  while (c <= n) {
    c = a + b;
    a = b;
    b = c;
    i++;
  }
  cout << i;
}
