
"""simple docstring"""



import timeit

import numpy as np

import datasets
from datasets.arrow_writer import ArrowWriter
from datasets.features.features import _ArrayXD


def 			_UpperCamelCase						(    _A   )     ->	Optional[Any]:





    """simple docstring"""

    def wrapper(*_A       ,   **_A   ):
        _UpperCAmelCase        = timeit.default_timer()
        _UpperCAmelCase        = func(*_A       ,   **_A   )
        _UpperCAmelCase        = timeit.default_timer() - starttime
        return delta

    _UpperCAmelCase        = func.__name__

    return wrapper


def 			_UpperCamelCase						(    _A       ,   _A=1_0_0       ,   _A=None   )     ->	int:





    """simple docstring"""

    _UpperCAmelCase        = []
    _UpperCAmelCase        = seq_shapes or {}
    for i in range(_A   ):
        _UpperCAmelCase        = {}
        for col_id, (k, v) in enumerate(features.items()   ):
            if isinstance(_A       ,   _ArrayXD   ):
                _UpperCAmelCase        = np.random.rand(*v.shape   ).astype(v.dtype   )
            elif isinstance(_A       ,   datasets.Value   ):
                if v.dtype == "string":
                    _UpperCAmelCase        = """The small grey turtle was surprisingly fast when challenged."""
                else:
                    _UpperCAmelCase        = np.random.randint(1_0       ,   size=1   ).astype(v.dtype   ).item()
            elif isinstance(_A       ,   datasets.Sequence   ):
                while isinstance(_A       ,   datasets.Sequence   ):
                    _UpperCAmelCase        = v.feature
                _UpperCAmelCase        = seq_shapes[k]
                _UpperCAmelCase        = np.random.rand(*_A   ).astype(v.dtype   )
            _UpperCAmelCase        = data

        dummy_data.append((i, example)   )

    return dummy_data







def 			_UpperCamelCase						(    _A       ,   _A       ,   _A=1_0_0       ,   _A=None   )     ->	List[Any]:





    """simple docstring"""

    _UpperCAmelCase        = generate_examples(_A       ,   num_examples=_A       ,   seq_shapes=_A   )

    with ArrowWriter(features=_A       ,   path=_A   ) as writer:
        for key, record in dummy_data:
            _UpperCAmelCase        = features.encode_example(_A   )
            writer.write(_A   )

        _UpperCAmelCase     ,_UpperCAmelCase        = writer.finalize()

    if not num_final_examples == num_examples:
        raise ValueError(
            F"""Error writing the dataset, wrote {num_final_examples} examples but should have written {num_examples}."""   )

    _UpperCAmelCase        = datasets.Dataset.from_file(filename=_A       ,   info=datasets.DatasetInfo(features=_A   )   )

    return dataset

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