



import json
import os
import tempfile

import transformers

import datasets
from utils import generate_example_dataset, get_duration


a_    :  str						  =		5_0_0_0_0_0

a_  ,			a_    :  Any						  =		os.path.split(__file__)
a_    :  Dict						  =		os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))

@get_duration
def      __lowercase(						UpperCAmelCase__ , **UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		dataset.map(**UpperCAmelCase__			)

@get_duration
def      __lowercase(						UpperCAmelCase__ , **UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		dataset.filter(**UpperCAmelCase__			)

def      __lowercase(						):


      """simple docstring"""



      lowerCamelCase             =		{"num examples": SPEED_TEST_N_EXAMPLES}
      with tempfile.TemporaryDirectory() as tmp_dir:
            lowerCamelCase             =		datasets.Features({"text": datasets.Value("string"			), "numbers": datasets.Value("float32"			)}			)
            lowerCamelCase             =		generate_example_dataset(
                os.path.join(UpperCAmelCase__ , "dataset.arrow"			) , UpperCAmelCase__ , num_examples=UpperCAmelCase__			)

            lowerCamelCase             =		transformers.AutoTokenizer.from_pretrained("bert-base-cased" , use_fast=UpperCAmelCase__			)

            def tokenize(UpperCAmelCase__			):
                  return tokenizer(examples["text"]			)

            lowerCamelCase             =		map(UpperCAmelCase__			)

            lowerCamelCase             =		map(UpperCAmelCase__ , batched=UpperCAmelCase__			)

            lowerCamelCase             =		map(UpperCAmelCase__ , function=lambda UpperCAmelCase__			: None , batched=UpperCAmelCase__			)

            with dataset.formatted_as(type="numpy"			):
                  lowerCamelCase             =		map(UpperCAmelCase__ , function=lambda UpperCAmelCase__			: None , batched=UpperCAmelCase__			)

            with dataset.formatted_as(type="pandas"			):
                  lowerCamelCase             =		map(UpperCAmelCase__ , function=lambda UpperCAmelCase__			: None , batched=UpperCAmelCase__			)

            with dataset.formatted_as(type="torch" , columns="numbers"			):
                  lowerCamelCase             =		map(UpperCAmelCase__ , function=lambda UpperCAmelCase__			: None , batched=UpperCAmelCase__			)

            with dataset.formatted_as(type="tensorflow" , columns="numbers"			):
                  lowerCamelCase             =		map(UpperCAmelCase__ , function=lambda UpperCAmelCase__			: None , batched=UpperCAmelCase__			)

            lowerCamelCase             =		map(UpperCAmelCase__ , function=UpperCAmelCase__ , batched=UpperCAmelCase__			)

            lowerCamelCase             =		filter(UpperCAmelCase__			)

            # Activate later when tokenizer support batched inputs
            # with dataset.formatted_as(type='numpy'):
            #     times[func.__name__ + " fast-tokenizer batched numpy"] = func(dataset, function=tokenize, batched=True)

      with open(UpperCAmelCase__ , "wb"			) as f:
            f.write(json.dumps(UpperCAmelCase__			).encode("utf-8"			)			)


if __name__ == "__main__":  # useful to run the profiler
     benchmark_map_filter()




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