#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long ans = 0;
  long long a = 1, b = 2, c;
  while (b <= n) {
    ans++;
    c = a + b;
    a = b;
    b = c;
  }
  cout << ans << endl;
  return 0;
}
