






'''simple docstring'''



from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


if TYPE_CHECKING:
 from ... import FeatureExtractionMixin, TensorType

__UpperCamelCase   :							str         =   logging.get_logger(__name__)

__UpperCamelCase   :							Dict         =   {
    """openai/imagegpt-small""": """""",
    """openai/imagegpt-medium""": """""",
    """openai/imagegpt-large""": """""",
}
class 				__SCREAMING_SNAKE_CASE							(				UpperCAmelCase_  ):
      __a	       ='imagegpt'
      __a	       =['past_key_values']
      __a	       ={
          'hidden_size': 'n_embd',
          'max_position_embeddings': 'n_positions',
          'num_attention_heads': 'n_head',
          'num_hidden_layers': 'n_layer',
      }




      def __init__(	self			, lowerCamelCase=512 + 1			, lowerCamelCase=32 * 32			, lowerCamelCase=512			, lowerCamelCase=24			, lowerCamelCase=8			, lowerCamelCase=None			, lowerCamelCase="quick_gelu"			, lowerCamelCase=0.1			, lowerCamelCase=0.1			, lowerCamelCase=0.1			, lowerCamelCase=1e-5			, lowerCamelCase=0.02			, lowerCamelCase=True			, lowerCamelCase=True			, lowerCamelCase=False			, lowerCamelCase=False			, lowerCamelCase=False			, **lowerCamelCase			, )				->Union[str, Any]:



         '''simple docstring'''
         __a					  =     vocab_size
         __a					  =     n_positions
         __a					  =     n_embd
         __a					  =     n_layer
         __a					  =     n_head
         __a					  =     n_inner
         __a					  =     activation_function
         __a					  =     resid_pdrop
         __a					  =     embd_pdrop
         __a					  =     attn_pdrop
         __a					  =     layer_norm_epsilon
         __a					  =     initializer_range
         __a					  =     scale_attn_weights
         __a					  =     use_cache
         __a					  =     scale_attn_by_inverse_layer_idx
         __a					  =     reorder_and_upcast_attn
         __a					  =     tie_word_embeddings

         super().__init__(tie_word_embeddings=SCREAMING_SNAKE_CASE_			, **SCREAMING_SNAKE_CASE_   )







class 				__SCREAMING_SNAKE_CASE							(				UpperCAmelCase_  ):




      @property
      def 			__UpperCamelCase				(	self   )				->int:



         '''simple docstring'''
         return OrderedDict(
             [
                 ('input_ids', {0: 'batch', 1: 'sequence'}),
             ]   )






      def 			__UpperCamelCase				(	self			, lowerCamelCase			, lowerCamelCase = 1			, lowerCamelCase = -1			, lowerCamelCase = False			, lowerCamelCase = None			, lowerCamelCase = 3			, lowerCamelCase = 32			, lowerCamelCase = 32			, )				->Dict:



         '''simple docstring'''
         __a					  =     self._generate_dummy_images(SCREAMING_SNAKE_CASE_			, SCREAMING_SNAKE_CASE_			, SCREAMING_SNAKE_CASE_			, SCREAMING_SNAKE_CASE_   )
         __a					  =     dict(preprocessor(images=SCREAMING_SNAKE_CASE_			, return_tensors=SCREAMING_SNAKE_CASE_   )   )

         return inputs

def 		UpperCamelCase						(   lowercase_ )		->						int:


  '''simple docstring'''






  if n == 1 or not isinstance(lowercase_			,			lowercase_ ):
    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 		UpperCamelCase						(   lowercase_ )		->						int:


  '''simple docstring'''






  lowercase__	: Optional[Any]     		=   0
  lowercase__	: Dict     		=   2

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

  return index

def 		UpperCamelCase						(   lowercase_ = 10_00 )		->						int:


  '''simple docstring'''






  return fibonacci_digits_index(lowercase_ )


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






