






'''simple docstring'''

import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
      import ctypes
      import msvcrt  # noqa




      class      A     (   ctypes.Structure    ):






       """simple docstring"""





       __a      :    List[Any]			  =    [('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]



def 				snake_case       (  )							->					List[str]:





      """simple docstring"""

      if os.name == "nt":
            UpperCamelCase_					: Any            =				CursorInfo()
            UpperCamelCase_					: str            =				ctypes.windll.kernelaa.GetStdHandle(-11						)
            ctypes.windll.kernelaa.GetConsoleCursorInfo(a_     , ctypes.byref(a_						)						)
            UpperCamelCase_					: Union[str, Any]            =				False
            ctypes.windll.kernelaa.SetConsoleCursorInfo(a_     , ctypes.byref(a_						)						)
      elif os.name == "posix":
            sys.stdout.write("""\033[?25l"""						)
            sys.stdout.flush()



def 				snake_case       (  )							->					Tuple:





      """simple docstring"""

      if os.name == "nt":
            UpperCamelCase_					: Any            =				CursorInfo()
            UpperCamelCase_					: Tuple            =				ctypes.windll.kernelaa.GetStdHandle(-11						)
            ctypes.windll.kernelaa.GetConsoleCursorInfo(a_     , ctypes.byref(a_						)						)
            UpperCamelCase_					: Tuple            =				True
            ctypes.windll.kernelaa.SetConsoleCursorInfo(a_     , ctypes.byref(a_						)						)
      elif os.name == "posix":
            sys.stdout.write("""\033[?25h"""						)
            sys.stdout.flush()



@contextmanager
def 				snake_case       (  )							->					str:





      """simple docstring"""

      try:
            hide_cursor()
            yield
      finally:
            show_cursor()














'''simple docstring'''

def 				snake_case       (  a_				:			int						)							->					int:





      """simple docstring"""

      if n == 1 or not isinstance(a_     , a_						):
            return 0
      elif n == 2:
            return 1
      else:
            UpperCamelCase_					: Dict            =				[0, 1]
            for i in range(2     , n + 1						):
                  sequence.append(sequence[i - 1] + sequence[i - 2]						)

            return sequence[n]



def 				snake_case       (  a_				:			int						)							->					int:





      """simple docstring"""

      UpperCamelCase_					: Any            =				0
      UpperCamelCase_					: Union[str, Any]            =				2

      while digits < n:
            index += 1
            UpperCamelCase_					: Any            =				len(str(fibonacci(a_						)						)						)

      return index



def 				snake_case       (  a_				:			int = 1_000						)							->					int:





      """simple docstring"""

      return fibonacci_digits_index(a_						)


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






