#include <bits/stdc++.h>
using namespace std;
long long int p(long long int n, long long int x) {
  if (x == 0) return 1;
  long long int k = p(n, (x / 2)) % 1000000007;
  if (x % 2)
    return ((n % 1000000007) *
            (((k % 1000000007) * (k % 1000000007)) % 1000000007)) %
           1000000007;
  return ((k % 1000000007) * (k % 1000000007)) % 1000000007;
}
int main() {
  unsigned long long int n, x = 1, y = 2, s = 1, ans = 0;
  cin >> n;
  while (s <= n) {
    s = x + y;
    x = y;
    y = s;
    ans++;
  }
  cout << ans << "\n";
}
