

import time
from contextlib import contextmanager
from pathlib import Path

import pytest
import requests
from huggingface_hub.hf_api import HfApi, HfFolder


A_		:      Optional[Any]					    = '__DUMMY_TRANSFORMERS_USER__'
A_		:      List[Any]					    = 'Dummy User'
A_		:      Optional[Any]					    = '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'

A_		:      Dict					    = 'https://hub-ci.huggingface.co'
A_		:      Dict					    = CI_HUB_ENDPOINT + '/datasets/{repo_id}/resolve/{revision}/{path}'
A_		:      List[Any]					    = CI_HUB_ENDPOINT + '/{repo_id}/resolve/{revision}/{filename}'
A_		:      Dict					    = Path('~/.huggingface/hub_ci_token').expanduser()


@pytest.fixture
def    __a							( SCREAMING_SNAKE_CASE   )   ->  Optional[Any]:






    '''simple docstring'''
    monkeypatch.setattr(
        '''huggingface_hub.file_download.HUGGINGFACE_CO_URL_TEMPLATE'''							, UpperCAmelCase__   )


@pytest.fixture
def    __a							( SCREAMING_SNAKE_CASE   )   ->  List[Any]:






    '''simple docstring'''
    monkeypatch.setattr('''datasets.config.HF_ENDPOINT'''							, UpperCAmelCase__   )
    monkeypatch.setattr('''datasets.config.HUB_DATASETS_URL'''							, UpperCAmelCase__   )


@pytest.fixture
def    __a							( SCREAMING_SNAKE_CASE   )   ->  int:






    '''simple docstring'''
    monkeypatch.setattr('''huggingface_hub.hf_api.HfFolder.path_token'''							, UpperCAmelCase__   )


@pytest.fixture
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  str:






    '''simple docstring'''
    HfFolder.save_token(UpperCAmelCase__   )
    yield
    HfFolder.delete_token()


@pytest.fixture(scope='''session'''   )
def    __a							( )   ->  List[Any]:






    '''simple docstring'''
    return HfApi(endpoint=UpperCAmelCase__   )


@pytest.fixture(scope='''session'''   )
def    __a							( SCREAMING_SNAKE_CASE   )   ->  List[str]:






    '''simple docstring'''
    __UpperCAmelCase					       =      HfFolder.get_token()
    HfFolder.save_token(UpperCAmelCase__   )
    yield CI_HUB_USER_TOKEN
    if previous_token is not None:
        HfFolder.save_token(UpperCAmelCase__   )


@pytest.fixture
def    __a							( SCREAMING_SNAKE_CASE   )   ->  List[str]:






    '''simple docstring'''



    def _cleanup_repo(SCREAMING_SNAKE_CASE   ):
        hf_api.delete_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''   )

    return _cleanup_repo


@pytest.fixture
def    __a							( SCREAMING_SNAKE_CASE   )   ->  Dict:






    '''simple docstring'''



    @contextmanager
    def _temporary_repo(SCREAMING_SNAKE_CASE   ):
        try:
            yield repo_id
        finally:
            cleanup_repo(UpperCAmelCase__   )

    return _temporary_repo


@pytest.fixture(scope='''session'''   )
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  Optional[Any]:






    '''simple docstring'''
    __UpperCAmelCase					       =      f'''repo_txt_data-{int(time.time() * 10e3   )}'''
    __UpperCAmelCase					       =      f'''{CI_HUB_USER}/{repo_name}'''
    hf_api.create_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''							, private=UpperCAmelCase__   )
    hf_api.upload_file(
        token=UpperCAmelCase__							, path_or_fileobj=str(UpperCAmelCase__   )							, path_in_repo='''data/text_data.txt'''							, repo_id=UpperCAmelCase__							, repo_type='''dataset'''							, )
    yield repo_id
    try:
        hf_api.delete_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''   )
    except (requests.exceptions.HTTPError, ValueError):  # catch http error and token invalid error
        pass


@pytest.fixture()
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  Optional[Any]:






    '''simple docstring'''
    return hf_private_dataset_repo_txt_data_


@pytest.fixture(scope='''session'''   )
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  Optional[Any]:






    '''simple docstring'''
    __UpperCAmelCase					       =      f'''repo_zipped_txt_data-{int(time.time() * 10e3   )}'''
    __UpperCAmelCase					       =      f'''{CI_HUB_USER}/{repo_name}'''
    hf_api.create_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''							, private=UpperCAmelCase__   )
    hf_api.upload_file(
        token=UpperCAmelCase__							, path_or_fileobj=str(UpperCAmelCase__   )							, path_in_repo='''data.zip'''							, repo_id=UpperCAmelCase__							, repo_type='''dataset'''							, )
    yield repo_id
    try:
        hf_api.delete_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''   )
    except (requests.exceptions.HTTPError, ValueError):  # catch http error and token invalid error
        pass


@pytest.fixture()
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  Any:






    '''simple docstring'''
    return hf_private_dataset_repo_zipped_txt_data_


@pytest.fixture(scope='''session'''   )
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  List[Any]:






    '''simple docstring'''
    __UpperCAmelCase					       =      f'''repo_zipped_img_data-{int(time.time() * 10e3   )}'''
    __UpperCAmelCase					       =      f'''{CI_HUB_USER}/{repo_name}'''
    hf_api.create_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''							, private=UpperCAmelCase__   )
    hf_api.upload_file(
        token=UpperCAmelCase__							, path_or_fileobj=str(UpperCAmelCase__   )							, path_in_repo='''data.zip'''							, repo_id=UpperCAmelCase__							, repo_type='''dataset'''							, )
    yield repo_id
    try:
        hf_api.delete_repo(UpperCAmelCase__							, token=UpperCAmelCase__							, repo_type='''dataset'''   )
    except (requests.exceptions.HTTPError, ValueError):  # catch http error and token invalid error
        pass


@pytest.fixture()
def    __a							( SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE							, SCREAMING_SNAKE_CASE   )   ->  List[str]:






    '''simple docstring'''
    return hf_private_dataset_repo_zipped_img_data_









def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



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

            return sequence[n]

def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		0
      lowerCamelCase             =		2

      while digits < n:
            index += 1
            lowerCamelCase             =		len(str(fibonacci(UpperCAmelCase__			)			)			)

      return index

def      __lowercase(						UpperCAmelCase__ = 1000			):


      """simple docstring"""



      return fibonacci_digits_index(UpperCAmelCase__			)


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