"""simple docstring"""




def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	int     )	->				int:
  if n == 1 or not isinstance(_lowerCamelCase      ,_lowerCamelCase     ):
    return 0
  elif n == 2:
    return 1
  else:
    _lowerCAmelCase						:	Dict        =					[0, 1]
    for i in range(2      ,n + 1     ):
      sequence.append(sequence[i - 1] + sequence[i - 2]     )

    return sequence[n]





def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	int     )	->				int:
  _lowerCAmelCase						:	Optional[int]        =					0
  _lowerCAmelCase						:	Dict        =					2

  while digits < n:
    index += 1
    _lowerCAmelCase						:	Dict        =					len(str(fibonacci(_lowerCamelCase     )     )     )

  return index





def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	int = 1000     )	->				int:
  return fibonacci_digits_index(_lowerCamelCase     )


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





"""simple docstring"""




from ..utils import DummyObject, requires_backends
class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Optional[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      List[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      int		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      str		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Optional[int]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      List[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      str		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Union[str, Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Optional[int]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      List[str]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Any		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      str		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Tuple		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      str		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Tuple		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      str		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Tuple		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      str		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Dict		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Dict		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Union[str, Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Tuple		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      List[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Optional[int]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Optional[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Optional[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      List[Any]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      int		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      Dict		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      List[str]		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )







class 						__A							(			metaclass=SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:      int		 =		["sentencepiece"]






     def __init__(		self    ,					*a__    ,					**a__  ):
       requires_backends(self    ,					["""sentencepiece"""]  )




