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