#include <bits/stdc++.h>
int main() {
  long long int n, i, j, c = 0, a, b, k;
  scanf("%lld", &n);
  a = 1;
  b = 1;
  k = a + b;
  while (k <= n) {
    c++;
    a = b;
    b = k;
    k = a + b;
  }
  printf("%lld", c);
}
