#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long a = 1, b = 1, c = 2, cnt = 0;
  while (c <= n) {
    a = b;
    b = c;
    c = a + b;
    cnt++;
  }
  cout << cnt << '\n';
  return 0;
}
