
"""simple docstring"""



def 					lowerCamelCase   (     _snake_case ):
    UpperCAmelCase__	:      List[str]     							=					[0] * len(_snake_case )

    for i in range(1    ,len(_snake_case ) ):
        # use last results for better performance - dynamic programming
        UpperCAmelCase__	:      Optional[int]     							=					prefix_result[i - 1]
        while j > 0 and input_string[i] != input_string[j]:
            UpperCAmelCase__	:      Union[str, Any]     							=					prefix_result[j - 1]

        if input_string[i] == input_string[j]:
            j += 1
        UpperCAmelCase__	:      Optional[int]     							=					j

    return prefix_result
def 					lowerCamelCase   (     _snake_case ):
    return max(prefix_function(_snake_case ) )


if __name__ == "__main__":
    import doctest

    doctest.testmod()





def 							UpperCamelCase_( lowerCamelCase_					)       ->		int:
    if n == 1 or not isinstance(lowerCamelCase_				,					lowerCamelCase_					):
        return 0
    elif n == 2:
        return 1
    else:
        _lowercase			:				List[str] 						=						[0, 1]
        for i in range(2				,					n + 1					):
            sequence.append(sequence[i - 1] + sequence[i - 2]					)

        return sequence[n]



def 							UpperCamelCase_( lowerCamelCase_					)       ->		int:
    _lowercase			:				Tuple 						=						0
    _lowercase			:				List[str] 						=						2

    while digits < n:
        index += 1
        _lowercase			:				Optional[int] 						=						len(str(fibonacci(lowerCamelCase_					)					)					)

    return index



def 							UpperCamelCase_( lowerCamelCase_ = 1000					)       ->		int:
    return fibonacci_digits_index(lowerCamelCase_					)


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


