

'''simple docstring'''
import itertools
from dataclasses import dataclass
from typing import Optional

import pandas as pd
import pyarrow as pa

import datasets
from datasets.table import table_cast


@dataclass
class    a__  (							datasets.BuilderConfig  ):
   _SCREAMING_SNAKE_CASE    :     Optional[datasets.Features]	       =							None




class    a__  (							datasets.ArrowBasedBuilder  ):
   _SCREAMING_SNAKE_CASE    :     Optional[Any]	       =							PandasConfig


   def 						_lowerCamelCase   ( self  ):





      """simple docstring"""





      return datasets.DatasetInfo(features=self.config.features  )


   def 						_lowerCamelCase   ( self			,				_UpperCamelCase  ):





      """simple docstring"""





      if not self.config.data_files:
         raise ValueError(f'''At least one data file must be specified, but got data_files={self.config.data_files}'''  )
      _lowercase			:      Union[str, Any]			     =   dl_manager.download_and_extract(self.config.data_files  )
      if isinstance(_UpperCAmelCase			,				(str, list, tuple)  ):
         _lowercase			:      Tuple			     =   data_files
         if isinstance(_UpperCAmelCase			,				_UpperCAmelCase  ):
            _lowercase			:      Union[str, Any]			     =   [files]
         # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
         _lowercase			:      Any			     =   [dl_manager.iter_files(_UpperCAmelCase  ) for file in files]
         return [datasets.SplitGenerator(name=datasets.Split.TRAIN			,				gen_kwargs={"files": files}  )]
      _lowercase			:      List[Any]			     =   []
      for split_name, files in data_files.items():
         if isinstance(_UpperCAmelCase			,				_UpperCAmelCase  ):
            _lowercase			:      List[str]			     =   [files]
         # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
         _lowercase			:      int			     =   [dl_manager.iter_files(_UpperCAmelCase  ) for file in files]
         splits.append(datasets.SplitGenerator(name=_UpperCAmelCase			,				gen_kwargs={"files": files}  )  )
      return splits


   def 						_lowerCamelCase   ( self			,				_UpperCamelCase  ):





      """simple docstring"""





      if self.config.features is not None:
         # more expensive cast to support nested features with keys in a different order
         # allows str <-> int/float or str to Audio for example
         _lowercase			:      List[str]			     =   table_cast(_UpperCAmelCase			,				self.config.features.arrow_schema  )
      return pa_table






   def 						_lowerCamelCase   ( self			,				_UpperCamelCase  ):





      """simple docstring"""





      for i, file in enumerate(itertools.chain.from_iterable(_UpperCAmelCase  )  ):
         with open(_UpperCAmelCase			,				"rb"  ) as f:
            _lowercase			:      Optional[Any]			     =   pa.Table.from_pandas(pd.read_pickle(_UpperCAmelCase  )  )
            yield i, self._cast_table(_UpperCAmelCase  )







"""simple docstring"""






def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  int:
   if n == 1 or not isinstance(__UpperCAmelCase       ,    __UpperCAmelCase ):
      return 0
   elif n == 2:
      return 1
   else:
      lowercase__:   List[Any]					=      [0, 1]
      for i in range(2       ,    n + 1 ):
         sequence.append(sequence[i - 1] + sequence[i - 2] )

      return sequence[n]



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  int:
   lowercase__:   Union[str, Any]					=      0
   lowercase__:   List[Any]					=      2

   while digits < n:
      index += 1
      lowercase__:   Dict					=      len(str(fibonacci(__UpperCAmelCase ) ) )

   return index



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase = 1_0_0_0 )  ->  int:
   return fibonacci_digits_index(__UpperCAmelCase )


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