






"""simple docstring"""



import copy

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


A_    =							logging.get_logger(__name__)

A_    =							{
    '''ut/deta''': '''https://huggingface.co/ut/deta/resolve/main/config.json''',
}






class 							__SCREAMING_SNAKE_CASE						(				UpperCamelCase		):
							snake_case_     =							'deta'
							snake_case_     =							{
							    'hidden_size': 'd_model',
							    'num_attention_heads': 'encoder_attention_heads',
							}


							def __init__(			self      :						List[Any]			,    snake_case      :						Dict=None			,    snake_case      :						Union[str, Any]=900			,    snake_case      :						Tuple=2048			,    snake_case      :						int=6			,    snake_case      :						List[str]=2048			,    snake_case      :						Dict=8			,    snake_case      :						Any=6			,    snake_case      :						Optional[int]=1024			,    snake_case      :						Tuple=8			,    snake_case      :						List[str]=0.0			,    snake_case      :						Tuple=True			,    snake_case      :						Dict="relu"			,    snake_case      :						List[str]=256			,    snake_case      :						str=0.1			,    snake_case      :						int=0.0			,    snake_case      :						Union[str, Any]=0.0			,    snake_case      :						List[Any]=0.02			,    snake_case      :						Optional[Any]=1.0			,    snake_case      :						List[Any]=True			,    snake_case      :						Union[str, Any]=False			,    snake_case      :						Union[str, Any]="sine"			,    snake_case      :						int=5			,    snake_case      :						Any=4			,    snake_case      :						Optional[Any]=4			,    snake_case      :						Optional[int]=True			,    snake_case      :						Tuple=300			,    snake_case      :						Union[str, Any]=True			,    snake_case      :						Any=True			,    snake_case      :						List[str]=1			,    snake_case      :						List[str]=5			,    snake_case      :						List[Any]=2			,    snake_case      :						List[Any]=1			,    snake_case      :						Optional[int]=1			,    snake_case      :						str=5			,    snake_case      :						Optional[Any]=2			,    snake_case      :						Union[str, Any]=0.1			,    snake_case      :						List[str]=0.25			,    **snake_case      :						Tuple			,    ):
													'''simple docstring'''





													if backbone_config is None:
																			logger.info("""`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone."""							)
																			A__						:  Union[str, Any]		  =  CONFIG_MAPPING["""resnet"""](out_features=["""stage2""", """stage3""", """stage4"""]							)
													else:
																			if isinstance(snake_case			,    snake_case							):
																									A__						:  Dict		  =  backbone_config.pop("""model_type"""							)
																									A__						:  Dict		  =  CONFIG_MAPPING[backbone_model_type]
																									A__						:  List[str]		  =  config_class.from_dict(snake_case							)

													A__						:  List[Any]		  =  backbone_config
													A__						:  int		  =  num_queries
													A__						:  str		  =  max_position_embeddings
													A__						:  int		  =  d_model
													A__						:  Dict		  =  encoder_ffn_dim
													A__						:  Union[str, Any]		  =  encoder_layers
													A__						:  Tuple		  =  encoder_attention_heads
													A__						:  Tuple		  =  decoder_ffn_dim
													A__						:  Tuple		  =  decoder_layers
													A__						:  Optional[Any]		  =  decoder_attention_heads
													A__						:  Optional[Any]		  =  dropout
													A__						:  int		  =  attention_dropout
													A__						:  Dict		  =  activation_dropout
													A__						:  int		  =  activation_function
													A__						:  Union[str, Any]		  =  init_std
													A__						:  Union[str, Any]		  =  init_xavier_std
													A__						:  Union[str, Any]		  =  encoder_layerdrop
													A__						:  List[str]		  =  auxiliary_loss
													A__						:  Union[str, Any]		  =  position_embedding_type
													# deformable attributes
													A__						:  Optional[Any]		  =  num_feature_levels
													A__						:  Any		  =  encoder_n_points
													A__						:  List[str]		  =  decoder_n_points
													A__						:  str		  =  two_stage
													A__						:  List[Any]		  =  two_stage_num_proposals
													A__						:  Tuple		  =  with_box_refine
													A__						:  List[Any]		  =  assign_first_stage
													if two_stage is True and with_box_refine is False:
																			raise ValueError("""If two_stage is True, with_box_refine must be True."""							)
													# Hungarian matcher
													A__						:  Optional[int]		  =  class_cost
													A__						:  List[Any]		  =  bbox_cost
													A__						:  Dict		  =  giou_cost
													# Loss coefficients
													A__						:  List[Any]		  =  mask_loss_coefficient
													A__						:  Any		  =  dice_loss_coefficient
													A__						:  Optional[int]		  =  bbox_loss_coefficient
													A__						:  Optional[int]		  =  giou_loss_coefficient
													A__						:  Union[str, Any]		  =  eos_coefficient
													A__						:  Optional[int]		  =  focal_alpha
													super().__init__(is_encoder_decoder=snake_case			,    **snake_case							)


							@property
							def 						_UpperCamelCase       (			self      :						Union[str, Any]							):
													'''simple docstring'''





													return self.encoder_attention_heads


							@property
							def 						_UpperCamelCase       (			self      :						Tuple							):
													'''simple docstring'''





													return self.d_model


							def 						_UpperCamelCase       (			self      :						Union[str, Any]							):
													'''simple docstring'''





													A__						:  Dict		  =  copy.deepcopy(self.__dict__							)
													A__						:  str		  =  self.backbone_config.to_dict()
													A__						:  int		  =  self.__class__.model_type
													return output














"""simple docstring"""



def      _lowerCAmelCase		(							UpperCAmelCase__       :					int = 1_0_0_0      )		->int:
						A__						:  Optional[int]		  =  2**power
						A__						:  Dict		  =  0
						while n:
												A__  ,  A__						:  Tuple		  =  r + n % 1_0, n // 1_0
						return r


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






