


'''simple docstring'''
# This code is adapted from OpenAI's release
# https://github.com/openai/human-eval/blob/master/human_eval/execution.py

import contextlib
import faulthandler
import io
import multiprocessing
import os
import platform
import signal
import tempfile





def    a__			(   lowerCAmelCase__    ,   lowerCAmelCase__    ,   lowerCAmelCase__    ,   lowerCAmelCase__		)       ->      Union[str, Any]:
    UpperCAmelCase__     :						Any						=							multiprocessing.Manager()
    UpperCAmelCase__     :						Optional[Any]						=							manager.list()

    UpperCAmelCase__     :						List[Any]						=							multiprocessing.Process(target=lowerCAmelCase__    ,   args=(check_program, result, timeout)		)
    p.start()
    p.join(timeout=timeout + 1		)
    if p.is_alive():
        p.kill()

    if not result:
        result.append('''timed out'''		)

    return {
        "task_id": task_id,
        "passed": result[0] == "passed",
        "result": result[0],
        "completion_id": completion_id,
    }





def    a__			(   lowerCAmelCase__    ,   lowerCAmelCase__    ,   lowerCAmelCase__		)       ->      int:
    with create_tempdir():
        # These system calls are needed when cleaning up tempdir.
        import os
        import shutil

        UpperCAmelCase__     :						Any						=							shutil.rmtree
        UpperCAmelCase__     :						List[Any]						=							os.rmdir
        UpperCAmelCase__     :						Union[str, Any]						=							os.chdir

        # Disable functionalities that can make destructive changes to the test.
        reliability_guard()

        # Run program.
        try:
            UpperCAmelCase__     :						Union[str, Any]						=							{}
            with swallow_io():
                with time_limit(lowerCAmelCase__		):
                    exec(lowerCAmelCase__    ,   lowerCAmelCase__		)
            result.append('''passed'''		)
        except TimeoutException:
            result.append('''timed out'''		)
        except BaseException as e:
            result.append(F"""failed: {e}"""		)

        # Needed for cleaning up.
        UpperCAmelCase__     :						Dict						=							rmtree
        UpperCAmelCase__     :						str						=							rmdir
        UpperCAmelCase__     :						str						=							chdir





@contextlib.contextmanager
def    a__			(   lowerCAmelCase__		)       ->      Optional[int]:
    def signal_handler(lowerCAmelCase__    ,   lowerCAmelCase__		):
        raise TimeoutException('''Timed out!'''		)

    signal.setitimer(signal.ITIMER_REAL    ,   lowerCAmelCase__		)
    signal.signal(signal.SIGALRM    ,   lowerCAmelCase__		)
    try:
        yield
    finally:
        signal.setitimer(signal.ITIMER_REAL    ,   0		)





@contextlib.contextmanager
def    a__			(   )       ->      List[Any]:
    UpperCAmelCase__     :						Union[str, Any]						=							WriteOnlyStringIO()
    with contextlib.redirect_stdout(lowerCAmelCase__		):
        with contextlib.redirect_stderr(lowerCAmelCase__		):
            with redirect_stdin(lowerCAmelCase__		):
                yield





@contextlib.contextmanager
def    a__			(   )       ->      List[str]:
    with tempfile.TemporaryDirectory() as dirname:
        with chdir(lowerCAmelCase__		):
            yield dirname




class      lowerCamelCase_  (      __a ):
      pass




class      lowerCamelCase_  (      io.StringIO ):






      def lowercase_				(   self							:       List[str]		,		*_A							:       Optional[Any]		,		**_A							:       int					):


          '''simple docstring'''


          raise OSError






      def lowercase_				(   self							:       Any		,		*_A							:       Tuple		,		**_A							:       List[str]					):


          '''simple docstring'''


          raise OSError






      def lowercase_				(   self							:       Optional[Any]		,		*_A							:       List[str]		,		**_A							:       Union[str, Any]					):


          '''simple docstring'''


          raise OSError






      def lowercase_				(   self							:       str		,		*_A							:       Dict		,		**_A							:       Optional[Any]					):


          '''simple docstring'''


          return False




class      lowerCamelCase_  (      contextlib._RedirectStream ):  # type: ignore
      lowerCAmelCase__							=	'stdin'





@contextlib.contextmanager
def    a__			(   lowerCAmelCase__		)       ->      Union[str, Any]:
    if root == ".":
        yield
        return
    UpperCAmelCase__     :						Union[str, Any]						=							os.getcwd()
    os.chdir(lowerCAmelCase__		)
    try:
        yield
    except BaseException as exc:
        raise exc
    finally:
        os.chdir(lowerCAmelCase__		)







def    a__			(   lowerCAmelCase__=None		)       ->      List[Any]:

    if maximum_memory_bytes is not None:
        import resource

        resource.setrlimit(resource.RLIMIT_AS    ,   (maximum_memory_bytes, maximum_memory_bytes)		)
        resource.setrlimit(resource.RLIMIT_DATA    ,   (maximum_memory_bytes, maximum_memory_bytes)		)
        if not platform.uname().system == "Darwin":
            resource.setrlimit(resource.RLIMIT_STACK    ,   (maximum_memory_bytes, maximum_memory_bytes)		)

    faulthandler.disable()

    import builtins

    UpperCAmelCase__     :						int						=							None
    UpperCAmelCase__     :						int						=							None

    import os

    UpperCAmelCase__     :						Dict						=							'''1'''

    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						List[str]						=							None
    UpperCAmelCase__     :						List[Any]						=							None
    UpperCAmelCase__     :						Tuple						=							None
    UpperCAmelCase__     :						List[str]						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						str						=							None
    UpperCAmelCase__     :						Dict						=							None
    UpperCAmelCase__     :						Any						=							None
    UpperCAmelCase__     :						int						=							None
    UpperCAmelCase__     :						List[str]						=							None
    UpperCAmelCase__     :						int						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						str						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						Optional[int]						=							None
    UpperCAmelCase__     :						Any						=							None
    UpperCAmelCase__     :						str						=							None
    UpperCAmelCase__     :						int						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						Any						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None
    UpperCAmelCase__     :						Dict						=							None
    UpperCAmelCase__     :						Any						=							None
    UpperCAmelCase__     :						List[Any]						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None

    import shutil

    UpperCAmelCase__     :						Optional[int]						=							None
    UpperCAmelCase__     :						Any						=							None
    UpperCAmelCase__     :						Union[str, Any]						=							None

    import subprocess

    UpperCAmelCase__     :						str						=							None  # type: ignore

    UpperCAmelCase__     :						Optional[Any]						=							None

    import sys

    UpperCAmelCase__     :						List[Any]						=							None
    UpperCAmelCase__     :						int						=							None
    UpperCAmelCase__     :						Optional[Any]						=							None
    UpperCAmelCase__     :						Optional[int]						=							None
    UpperCAmelCase__     :						Optional[Any]						=							None








'''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())))






