#include <bits/stdc++.h>
using namespace std;
long long n;
void enter() { cin >> n; }
void solve() {
  int cnt = 0;
  long long a = 1, b = 1;
  while (b <= n) {
    tie(a, b) = make_tuple(b, a + b);
    cnt++;
  }
  cout << cnt - 1 << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  if (ifstream("test.inp")) cin.rdbuf((new ifstream("test.inp"))->rdbuf());
  enter();
  solve();
}
