



import copy
from typing import Dict, List, Optional

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto import CONFIG_MAPPING


SCREAMING_SNAKE_CASE__   			=   {
    '''facebook/mask2former-swin-small-coco-instance''': (
        '''https://huggingface.co/facebook/mask2former-swin-small-coco-instance/blob/main/config.json'''
    )
    # See all Mask2Former models at https://huggingface.co/models?filter=mask2former
}

SCREAMING_SNAKE_CASE__   			=   logging.get_logger(__name__)


class   __lowerCAmelCase  (		UpperCAmelCase_   ):
					"""simple docstring"""






					A__					:		Any      							=     "mask2former"
					A__					:		int      							=     ["swin"]
					A__					:		Union[str, Any]      							=     {"hidden_size": "hidden_dim"}



					def __init__(  self       :							Union[str, Any]					,       _snake_case       :							Optional[Dict] = None					,       _snake_case       :							int = 2_56					,       _snake_case       :							int = 2_56					,       _snake_case       :							int = 2_56					,       _snake_case       :							int = 10_24					,       _snake_case       :							str = "relu"					,       _snake_case       :							int = 6					,       _snake_case       :							int = 10					,       _snake_case       :							int = 8					,       _snake_case       :							float = 0.0					,       _snake_case       :							int = 20_48					,       _snake_case       :							bool = False					,       _snake_case       :							bool = False					,       _snake_case       :							int = 4					,       _snake_case       :							int = 2_55					,       _snake_case       :							int = 1_00					,       _snake_case       :							float = 0.1					,       _snake_case       :							float = 2.0					,       _snake_case       :							float = 5.0					,       _snake_case       :							float = 5.0					,       _snake_case       :							int = 1_25_44					,       _snake_case       :							float = 3.0					,       _snake_case       :							float = 0.75					,       _snake_case       :							float = 0.02					,       _snake_case       :							float = 1.0					,       _snake_case       :							bool = True					,       _snake_case       :							List[int] = [4, 8, 16, 32]					,       _snake_case       :							bool = None					,       **_snake_case       :							str					,       ):






								"""simple docstring"""


								if backbone_config is None:
											logger.info('`backbone_config` is `None`. Initializing the config with the default `Swin` backbone.'       )
											A__	  =     CONFIG_MAPPING['swin'](
											    image_size=2_24					,       in_channels=3					,       patch_size=4					,       embed_dim=96					,       depths=[2, 2, 18, 2]					,       num_heads=[3, 6, 12, 24]					,       window_size=7					,       drop_path_rate=0.3					,       use_absolute_embeddings=_snake_case					,       out_features=['stage1', 'stage2', 'stage3', 'stage4']					,       )

								if isinstance(_snake_case					,       _snake_case       ):
											A__	  =     backbone_config.pop('model_type'       )
											A__	  =     CONFIG_MAPPING[backbone_model_type]
											A__	  =     config_class.from_dict(_snake_case       )

								# verify that the backbone is supported
								if backbone_config.model_type not in self.backbones_supported:
											logger.warning_once(
											    F'''Backbone {backbone_config.model_type} is not a supported model and may not be compatible with Mask2Former. '''
											    F'''Supported model types: {",".join(self.backbones_supported       )}'''       )

								A__	  =     backbone_config
								A__	  =     feature_size
								A__	  =     mask_feature_size
								A__	  =     hidden_dim
								A__	  =     encoder_feedforward_dim
								A__	  =     activation_function
								A__	  =     encoder_layers
								A__	  =     decoder_layers
								A__	  =     num_attention_heads
								A__	  =     dropout
								A__	  =     dim_feedforward
								A__	  =     pre_norm
								A__	  =     enforce_input_projection
								A__	  =     common_stride
								A__	  =     ignore_value
								A__	  =     num_queries
								A__	  =     no_object_weight
								A__	  =     class_weight
								A__	  =     mask_weight
								A__	  =     dice_weight
								A__	  =     train_num_points
								A__	  =     oversample_ratio
								A__	  =     importance_sample_ratio
								A__	  =     init_std
								A__	  =     init_xavier_std
								A__	  =     use_auxiliary_loss
								A__	  =     feature_strides
								A__	  =     output_auxiliary_logits
								A__	  =     decoder_layers

								super().__init__(**_snake_case       )



					@classmethod
					def      _a				(  cls       :							Union[str, Any]					,       _snake_case       :							PretrainedConfig					,       **_snake_case       :							Tuple       ):






								"""simple docstring"""


								return cls(
								    backbone_config=_snake_case					,       **_snake_case					,       )



					def      _a				(  self       :							Dict       ):






								"""simple docstring"""


								A__	  =     copy.deepcopy(self.__dict__       )
								A__	  =     self.backbone_config.to_dict()
								A__	  =     self.__class__.model_type
								return output












'''simple docstring'''

def 				snake_case       (  a_				:			int						)							->					int:





      """simple docstring"""

      if n == 1 or not isinstance(a_     , a_						):
            return 0
      elif n == 2:
            return 1
      else:
            UpperCamelCase_					: Dict            =				[0, 1]
            for i in range(2     , n + 1						):
                  sequence.append(sequence[i - 1] + sequence[i - 2]						)

            return sequence[n]



def 				snake_case       (  a_				:			int						)							->					int:





      """simple docstring"""

      UpperCamelCase_					: Any            =				0
      UpperCamelCase_					: Union[str, Any]            =				2

      while digits < n:
            index += 1
            UpperCamelCase_					: Any            =				len(str(fibonacci(a_						)						)						)

      return index



def 				snake_case       (  a_				:			int = 1_000						)							->					int:





      """simple docstring"""

      return fibonacci_digits_index(a_						)


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






