#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a = 2, b = 3, c;
  int cnt = 0;
  scanf("%I64d", &n);
  while (a <= n) {
    c = b;
    b = a + b;
    a = c;
    cnt++;
  }
  printf("%d\n", cnt);
  return 0;
}
