#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
long long f[MAXN] = {1, 2};
int main() {
  for (int i = 2; i < MAXN; i++) f[i] = f[i - 1] + f[i - 2];
  long long n;
  scanf("%I64d", &n);
  for (int i = 1; i + 1 < MAXN; i++)
    if (f[i + 1] > n) return 0 * printf("%d", i);
}
