
"""simple docstring"""



def 			_UpperCamelCase						(    _A = 1_0_0_0   )     ->	int:





    """simple docstring"""

    _UpperCAmelCase     ,_UpperCAmelCase        = 1, 1
    _UpperCAmelCase        = 2
    while True:
        _UpperCAmelCase        = 0
        _UpperCAmelCase        = fa + fa
        _UpperCAmelCase     ,_UpperCAmelCase        = fa, f
        index += 1
        for _ in str(_A   ):
            i += 1
        if i == n:
            break
    return index


if __name__ == "__main__":
 print(solution(int(str(input()).strip())))

"""simple docstring"""



def 			_UpperCamelCase						(    _A = 1_0_0_0   )     ->	int:





    """simple docstring"""

    _UpperCAmelCase     ,_UpperCAmelCase        = 1, 1
    _UpperCAmelCase        = 2
    while True:
        _UpperCAmelCase        = 0
        _UpperCAmelCase        = fa + fa
        _UpperCAmelCase     ,_UpperCAmelCase        = fa, f
        index += 1
        for _ in str(_A   ):
            i += 1
        if i == n:
            break
    return index


if __name__ == "__main__":
 print(solution(int(str(input()).strip())))