#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long i = 1, j = 1, ans = 0, k = i + j;
  while (k <= n) {
    ans++;
    i = j;
    j = k;
    k = i + j;
  }
  cout << ans;
  return 0;
}
