#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
vector<long long> prime(1000001, 1);
vector<long long> sdf(1000001, 1);
long long inf = 1000000000000000007;
vector<vector<int>> l;
vector<bool> visited;
long long maxi(long long a, long long b, long long c) {
  long long m1 = max(a, b);
  long long m2 = max(a, c);
  return max(m1, m2);
}
long long modular_expo(long double x, long long y) {
  if (y == 0) return 1;
  if (y % 2 == 0) return modular_expo(x * x, y / 2);
  if (y % 2 == 1) return x * modular_expo(x * x, (y - 1) / 2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long x = 1, y = 2, z;
  long long cnt = 0;
  long long i = 1;
  while (y <= n) {
    z = x;
    x = y;
    y = z + y;
    cnt++;
  }
  cout << cnt;
}
