#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, x, y, z = 1, tmp;
  cin >> n;
  x = 1;
  y = 1;
  while (y <= n) {
    tmp = x + y;
    x = y;
    y = tmp;
    z++;
  }
  cout << z - 2 << "\n";
  return 0;
}
