#include <bits/stdc++.h>
using namespace std;
long long n;
long long ans = 0;
long long table[205];
void init() {
  cin >> n;
  table[1] = 2;
  table[2] = 3;
  for (int i = 3; i <= 200; i++) {
    table[i] = table[i - 1] + table[i - 2];
  }
}
void work() {
  for (int i = 1; i <= 200; i++) {
    if (n < table[i]) {
      cout << (i - 1) << endl;
      return;
    }
  }
}
int main() {
  init();
  work();
  return 0;
}
