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