#include <iostream>
#include <fstream>
#include <climits>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    //freopen("data.in", "rt", stdin);    freopen("data.out", "wt", stdout);
    long long x = 0;
    scanf("%d", &x);
    long long a = 1, b = 1;
    long long i = 1;
    while(1) {
        i++;
        long long c = a + b;
        a = b;
        b = c;
        if(c >= x)
            break;
    }
    cout << i << '\n';


    return 0;
}