


'''simple docstring'''
from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional

from packaging import version

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


if TYPE_CHECKING:
		from ...processing_utils import ProcessorMixin
		from ...utils import TensorType


__snake_case							      =     logging.get_logger(__name__)

__snake_case							      =     {
    '''microsoft/layoutlmv3-base''': '''https://huggingface.co/microsoft/layoutlmv3-base/resolve/main/config.json''',
}
class    lowercase	(							A__					):

		"""simple docstring"""

		_a     =				'layoutlmv3'




		def __init__(		self    ,   UpperCamelCase_=50265    ,   UpperCamelCase_=768    ,   UpperCamelCase_=12    ,   UpperCamelCase_=12    ,   UpperCamelCase_=3072    ,   UpperCamelCase_="gelu"    ,   UpperCamelCase_=0.1    ,   UpperCamelCase_=0.1    ,   UpperCamelCase_=512    ,   UpperCamelCase_=2    ,   UpperCamelCase_=0.02    ,   UpperCamelCase_=1e-5    ,   UpperCamelCase_=1    ,   UpperCamelCase_=0    ,   UpperCamelCase_=2    ,   UpperCamelCase_=1024    ,   UpperCamelCase_=128    ,   UpperCamelCase_=128    ,   UpperCamelCase_=True    ,   UpperCamelCase_=32    ,   UpperCamelCase_=128    ,   UpperCamelCase_=64    ,   UpperCamelCase_=256    ,   UpperCamelCase_=True    ,   UpperCamelCase_=True    ,   UpperCamelCase_=True    ,   UpperCamelCase_=224    ,   UpperCamelCase_=3    ,   UpperCamelCase_=16    ,   UpperCamelCase_=None    ,   **UpperCamelCase_    ,   ):

							'''simple docstring'''


							super().__init__(
							    vocab_size=UpperCamelCase_    ,   hidden_size=UpperCamelCase_    ,   num_hidden_layers=UpperCamelCase_    ,   num_attention_heads=UpperCamelCase_    ,   intermediate_size=UpperCamelCase_    ,   hidden_act=UpperCamelCase_    ,   hidden_dropout_prob=UpperCamelCase_    ,   attention_probs_dropout_prob=UpperCamelCase_    ,   max_position_embeddings=UpperCamelCase_    ,   type_vocab_size=UpperCamelCase_    ,   initializer_range=UpperCamelCase_    ,   layer_norm_eps=UpperCamelCase_    ,   pad_token_id=UpperCamelCase_    ,   bos_token_id=UpperCamelCase_    ,   eos_token_id=UpperCamelCase_    ,   **UpperCamelCase_    ,   )
							UpperCamelCase__   :Tuple												= max_ad_position_embeddings
							UpperCamelCase__   :List[Any]												= coordinate_size
							UpperCamelCase__   :Union[str, Any]												= shape_size
							UpperCamelCase__   :int												= has_relative_attention_bias
							UpperCamelCase__   :Any												= rel_pos_bins
							UpperCamelCase__   :Tuple												= max_rel_pos
							UpperCamelCase__   :Optional[Any]												= has_spatial_attention_bias
							UpperCamelCase__   :Union[str, Any]												= rel_ad_pos_bins
							UpperCamelCase__   :Union[str, Any]												= max_rel_ad_pos
							UpperCamelCase__   :Dict												= text_embed
							UpperCamelCase__   :Optional[Any]												= visual_embed
							UpperCamelCase__   :Dict												= input_size
							UpperCamelCase__   :List[Any]												= num_channels
							UpperCamelCase__   :Optional[int]												= patch_size
							UpperCamelCase__   :str												= classifier_dropout



class    lowercase	(							A__					):

		"""simple docstring"""

		_a     =				version.parse('1.12'					)




		@property
		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							if self.task in ["question-answering", "sequence-classification"]:
												return OrderedDict(
												    [
												        ('''input_ids''', {0: '''batch''', 1: '''sequence'''}),
												        ('''attention_mask''', {0: '''batch''', 1: '''sequence'''}),
												        ('''bbox''', {0: '''batch''', 1: '''sequence'''}),
												        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
												    ]							)
							else:
												return OrderedDict(
												    [
												        ('''input_ids''', {0: '''batch''', 1: '''sequence'''}),
												        ('''bbox''', {0: '''batch''', 1: '''sequence'''}),
												        ('''attention_mask''', {0: '''batch''', 1: '''sequence'''}),
												        ('''pixel_values''', {0: '''batch''', 1: '''num_channels'''}),
												    ]							)




		@property
		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							return 1e-5




		@property
		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							return 12




		def     lowerCAmelCase__				(		self    ,   UpperCamelCase_    ,   UpperCamelCase_ = -1    ,   UpperCamelCase_ = -1    ,   UpperCamelCase_ = False    ,   UpperCamelCase_ = None    ,   UpperCamelCase_ = 3    ,   UpperCamelCase_ = 40    ,   UpperCamelCase_ = 40    ,   ):

							'''simple docstring'''


							setattr(processor.image_processor    ,   '''apply_ocr'''    ,   UpperCamelCase_							)

							# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
							UpperCamelCase__   :Optional[int]												= compute_effective_axis_dimension(
							    UpperCamelCase_    ,   fixed_dimension=OnnxConfig.default_fixed_batch    ,   num_token_to_add=0							)
							# If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
							UpperCamelCase__   :Union[str, Any]												= processor.tokenizer.num_special_tokens_to_add(UpperCamelCase_							)
							UpperCamelCase__   :Union[str, Any]												= compute_effective_axis_dimension(
							    UpperCamelCase_    ,   fixed_dimension=OnnxConfig.default_fixed_sequence    ,   num_token_to_add=UpperCamelCase_							)
							# Generate dummy inputs according to compute batch and sequence
							UpperCamelCase__   :Union[str, Any]												= [[''' '''.join([processor.tokenizer.unk_token]							) * seq_length]] * batch_size

							# Generate dummy bounding boxes
							UpperCamelCase__   :str												= [[[48, 84, 73, 128]]] * batch_size

							# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
							# batch_size = compute_effective_axis_dimension(batch_size, fixed_dimension=OnnxConfig.default_fixed_batch)
							UpperCamelCase__   :Optional[Any]												= self._generate_dummy_images(UpperCamelCase_    ,   UpperCamelCase_    ,   UpperCamelCase_    ,   UpperCamelCase_							)

							UpperCamelCase__   :Any												= dict(
							    processor(
							        UpperCamelCase_    ,   text=UpperCamelCase_    ,   boxes=UpperCamelCase_    ,   return_tensors=UpperCamelCase_    ,   )							)

							return inputs
def    a__       (						__UpperCamelCase ):
      if n == 1 or not isinstance(__UpperCamelCase   ,					__UpperCamelCase ):
            return 0
      elif n == 2:
            return 1
      else:
            SCREAMING_SNAKE_CASE_      =     [0, 1]
            for i in range(2   ,					n + 1 ):
                  sequence.append(sequence[i - 1] + sequence[i - 2] )

            return sequence[n]


def    a__       (						__UpperCamelCase ):
      SCREAMING_SNAKE_CASE_      =     0
      SCREAMING_SNAKE_CASE_      =     2

      while digits < n:
            index += 1
            SCREAMING_SNAKE_CASE_      =     len(str(fibonacci(__UpperCamelCase ) ) )

      return index


def    a__       (						__UpperCamelCase = 1_0_0_0 ):
      return fibonacci_digits_index(__UpperCamelCase )


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


