#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
vector<long long> v;
map<string, int> mp;
long long n, a, b, c, i;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  a = 1;
  b = 2;
  while (c <= n) {
    c = a + b;
    a = b;
    b = c;
    i++;
  }
  cout << i;
  return 0;
}
