from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_ : Union[str, Any]						  =      logging.get_logger(__name__)

lowerCAmelCase_ : str						  =      {
    'google/canine-s': 'https://huggingface.co/google/canine-s/resolve/main/config.json',
    # See all CANINE models at https://huggingface.co/models?filter=canine
}





class 							lowercase						(						__lowerCamelCase ):
   lowerCamelCase_    					='canine'


   def __init__(   self				:	List[str]   ,		__lowerCAmelCase				:	int=768   ,		__lowerCAmelCase				:	List[str]=12   ,		__lowerCAmelCase				:	Dict=12   ,		__lowerCAmelCase				:	List[str]=3072   ,		__lowerCAmelCase				:	Union[str, Any]="gelu"   ,		__lowerCAmelCase				:	List[str]=0.1   ,		__lowerCAmelCase				:	List[Any]=0.1   ,		__lowerCAmelCase				:	Any=1_6384   ,		__lowerCAmelCase				:	str=16   ,		__lowerCAmelCase				:	List[Any]=0.02   ,		__lowerCAmelCase				:	Dict=1e-12   ,		__lowerCAmelCase				:	List[str]=0   ,		__lowerCAmelCase				:	Optional[Any]=0XE000   ,		__lowerCAmelCase				:	Any=0XE001   ,		__lowerCAmelCase				:	Tuple=4   ,		__lowerCAmelCase				:	Optional[Any]=4   ,		__lowerCAmelCase				:	Dict=8   ,		__lowerCAmelCase				:	int=1_6384   ,		__lowerCAmelCase				:	List[Any]=128   ,		**__lowerCAmelCase				:	Union[str, Any]   ,		)      ->					int:
         super().__init__(pad_token_id=_lowerCAmelCase   ,		bos_token_id=_lowerCAmelCase   ,		eos_token_id=_lowerCAmelCase   ,		**_lowerCAmelCase)

         lowercase_     =      max_position_embeddings
         lowercase_     =      hidden_size
         lowercase_     =      num_hidden_layers
         lowercase_     =      num_attention_heads
         lowercase_     =      intermediate_size
         lowercase_     =      hidden_act
         lowercase_     =      hidden_dropout_prob
         lowercase_     =      attention_probs_dropout_prob
         lowercase_     =      initializer_range
         lowercase_     =      type_vocab_size
         lowercase_     =      layer_norm_eps

         # Character config:
         lowercase_     =      downsampling_rate
         lowercase_     =      upsampling_kernel_size
         lowercase_     =      num_hash_functions
         lowercase_     =      num_hash_buckets
         lowercase_     =      local_transformer_stride







'''simple docstring'''

from __future__ import annotations


def __a (	__lowerCamelCase			:						int | str				)	->							bool:
      '''simple docstring'''


      lowercase_     =      str(__lowerCamelCase				)
      return n == n[::-1]


def __a (	__lowerCamelCase			:						int = 1_000_000				)	->							Optional[int]:
      '''simple docstring'''


      lowercase_     =      0

      for i in range(1 ,		__lowerCamelCase				):
            if is_palindrome(__lowerCamelCase				) and is_palindrome(bin(__lowerCamelCase				).split("b"				)[1]				):
                  total += i
      return total


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






