#include <bits/stdc++.h>
int main() {
  long long int c = 0, n, n1 = 1, n2 = 1, n3 = n1 + n2;
  scanf("%lld", &n);
  while (n3 <= n) {
    c++;
    n1 = n2;
    n2 = n3;
    n3 = n1 + n2;
  }
  printf("%lld", c);
  return 0;
}
