
"""simple docstring"""



import logging
import os
from logging import (
    CRITICAL,  # NOQA
    DEBUG,  # NOQA
    ERROR,  # NOQA
    FATAL,  # NOQA
    INFO,  # NOQA
    NOTSET,  # NOQA
    WARN,  # NOQA
    WARNING,  # NOQA
)
from typing import Optional

from tqdm import auto as tqdm_lib


a       :						Dict       		=		{
    '''debug''': logging.DEBUG,
    '''info''': logging.INFO,
    '''warning''': logging.WARNING,
    '''error''': logging.ERROR,
    '''critical''': logging.CRITICAL,
}

a       :						int       		=		logging.WARNING


def 			_UpperCamelCase						(    )     ->	Tuple:





    """simple docstring"""

    _UpperCAmelCase        = os.getenv("""DATASETS_VERBOSITY"""       ,   _A   )
    if env_level_str:
        if env_level_str in log_levels:
            return log_levels[env_level_str]
        else:
            logging.getLogger().warning(
                F"""Unknown option DATASETS_VERBOSITY={env_level_str}, """
                F"""has to be one of: { ", ".join(log_levels.keys()   ) }"""   )
    return _default_log_level


def 			_UpperCamelCase						(    )     ->	str:





    """simple docstring"""

    return __name__.split("""."""   )[0]


def 			_UpperCamelCase						(    )     ->	logging.Logger:





    """simple docstring"""

    return logging.getLogger(_get_library_name()   )


def 			_UpperCamelCase						(    )     ->	None:





    """simple docstring"""

    _UpperCAmelCase        = _get_library_root_logger()
    library_root_logger.setLevel(_get_default_logging_level()   )


def 			_UpperCamelCase						(    )     ->	None:





    """simple docstring"""

    _UpperCAmelCase        = _get_library_root_logger()
    library_root_logger.setLevel(logging.NOTSET   )


def 			_UpperCamelCase						(    _A = None   )     ->	logging.Logger:





    """simple docstring"""

    if name is None:
        _UpperCAmelCase        = _get_library_name()
    return logging.getLogger(_A   )


def 			_UpperCamelCase						(    )     ->	int:





    """simple docstring"""

    return _get_library_root_logger().getEffectiveLevel()


def 			_UpperCamelCase						(    _A   )     ->	None:





    """simple docstring"""

    _get_library_root_logger().setLevel(_A   )


def 			_UpperCamelCase						(    )     ->	Optional[Any]:





    """simple docstring"""

    return set_verbosity(_A   )


def 			_UpperCamelCase						(    )     ->	Any:





    """simple docstring"""

    return set_verbosity(_A   )


def 			_UpperCamelCase						(    )     ->	Union[str, Any]:





    """simple docstring"""

    return set_verbosity(_A   )


def 			_UpperCamelCase						(    )     ->	List[str]:





    """simple docstring"""

    return set_verbosity(_A   )


def 			_UpperCamelCase						(    )     ->	None:





    """simple docstring"""

    _UpperCAmelCase        = False


def 			_UpperCamelCase						(    )     ->	None:





    """simple docstring"""

    _UpperCAmelCase        = True


# Configure the library root logger at the module level (singleton-like)
_configure_library_root_logger()




class 		a_    :







    def __init__(      self      :							List[Any]  ,       *__UpperCamelCase      :							int  ,       **__UpperCamelCase      :							Union[str, Any]  )		->Union[str, Any]:  # pylint: disable=unused-argument






        '''simple docstring'''






        _UpperCAmelCase        = args[0] if args else None







    def __iter__(      self      :							Tuple  )		->Dict:






        '''simple docstring'''






        return iter(self._iterator  )







    def __getattr__(      self      :							Optional[Any]  ,       __UpperCamelCase      :							Optional[Any]  )		->Any:






        '''simple docstring'''






        def empty_fn(*__UpperCamelCase      :							List[Any]  ,       **__UpperCamelCase      :							List[Any]  ):  # pylint: disable=unused-argument
            return

        return empty_fn







    def __enter__(      self      :							Optional[int]  )		->Optional[int]:






        '''simple docstring'''






        return self







    def __exit__(      self      :							Union[str, Any]  ,       __UpperCamelCase      :							str  ,       __UpperCamelCase      :							List[str]  ,       __UpperCamelCase      :							int  )		->Union[str, Any]:






        '''simple docstring'''






        return







a       :						List[str]       		=		True




class 		a_    :







    def __call__(      self      :							List[Any]  ,       *__UpperCamelCase      :							int  ,       __UpperCamelCase      :							List[str]=False  ,       **__UpperCamelCase      :							List[str]  )		->Any:






        '''simple docstring'''






        if _tqdm_active and not disable:
            return tqdm_lib.tqdm(*__UpperCamelCase  ,       **__UpperCamelCase  )
        else:
            return EmptyTqdm(*__UpperCamelCase  ,       **__UpperCamelCase  )







    def   _snake_case       (      self      :							List[str]  ,       *__UpperCamelCase      :							Any  ,       **__UpperCamelCase      :							str  )		->List[str]:






        '''simple docstring'''






        _UpperCAmelCase        = None
        if _tqdm_active:
            return tqdm_lib.tqdm.set_lock(*__UpperCamelCase  ,       **__UpperCamelCase  )







    def   _snake_case       (      self      :							Optional[Any]  )		->Optional[Any]:






        '''simple docstring'''






        if _tqdm_active:
            return tqdm_lib.tqdm.get_lock()







a       :						str       		=		_tqdm_cls()


def 			_UpperCamelCase						(    )     ->	bool:





    """simple docstring"""

    global _tqdm_active
    return bool(_tqdm_active   )


def 			_UpperCamelCase						(    )     ->	Any:





    """simple docstring"""

    global _tqdm_active
    _UpperCAmelCase        = True







def 			_UpperCamelCase						(    )     ->	Union[str, Any]:





    """simple docstring"""

    global _tqdm_active
    _UpperCAmelCase        = False

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