




'''simple docstring'''

import functools
import operator

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


a    :							Any										=    logging.get_logger(__name__)

a    :							List[Any]										=    {
    'microsoft/unispeech-large-1500h-cv': (
        'https://huggingface.co/microsoft/unispeech-large-1500h-cv/resolve/main/config.json'
    ),
    # See all UniSpeech models at https://huggingface.co/models?filter=unispeech
}






class 		a							(  _lowerCAmelCase	):
				snake_case_           =						"unispeech"


				def __init__(						self       :   Dict			,							lowercase_       :   str=32			,							lowercase_       :   Dict=768			,							lowercase_       :   str=12			,							lowercase_       :   Dict=12			,							lowercase_       :   List[Any]=3072			,							lowercase_       :   Union[str, Any]="gelu"			,							lowercase_       :   Optional[Any]=0.1			,							lowercase_       :   Tuple=0.1			,							lowercase_       :   Optional[int]=0.1			,							lowercase_       :   Dict=0.0			,							lowercase_       :   Optional[int]=0.0			,							lowercase_       :   Union[str, Any]=0.1			,							lowercase_       :   int=0.1			,							lowercase_       :   Optional[int]=0.02			,							lowercase_       :   str=1e-5			,							lowercase_       :   List[Any]="group"			,							lowercase_       :   str="gelu"			,							lowercase_       :   Tuple=(512, 512, 512, 512, 512, 512, 512)			,							lowercase_       :   Tuple=(5, 2, 2, 2, 2, 2, 2)			,							lowercase_       :   Any=(10, 3, 3, 3, 3, 2, 2)			,							lowercase_       :   List[str]=False			,							lowercase_       :   Optional[Any]=128			,							lowercase_       :   Tuple=16			,							lowercase_       :   Any=False			,							lowercase_       :   List[Any]=True			,							lowercase_       :   Optional[Any]=0.05			,							lowercase_       :   List[str]=10			,							lowercase_       :   Tuple=2			,							lowercase_       :   str=0.0			,							lowercase_       :   Tuple=10			,							lowercase_       :   Optional[int]=0			,							lowercase_       :   int=320			,							lowercase_       :   Tuple=2			,							lowercase_       :   List[str]=0.1			,							lowercase_       :   List[Any]=100			,							lowercase_       :   Optional[Any]=256			,							lowercase_       :   Dict=256			,							lowercase_       :   Any=0.1			,							lowercase_       :   List[str]="mean"			,							lowercase_       :   List[str]=False			,							lowercase_       :   Any=False			,							lowercase_       :   Tuple=256			,							lowercase_       :   Any=80			,							lowercase_       :   str=0			,							lowercase_       :   Optional[Any]=1			,							lowercase_       :   Any=2			,							lowercase_       :   str=0.5			,							**lowercase_       :   Any			,							):
									super().__init__(**SCREAMING_SNAKE_CASE_			,							pad_token_id=SCREAMING_SNAKE_CASE_			,							bos_token_id=SCREAMING_SNAKE_CASE_			,							eos_token_id=SCREAMING_SNAKE_CASE_   )
									snake_case_		     =							hidden_size
									snake_case_		     =							feat_extract_norm
									snake_case_		     =							feat_extract_activation
									snake_case_		     =							list(SCREAMING_SNAKE_CASE_   )
									snake_case_		     =							list(SCREAMING_SNAKE_CASE_   )
									snake_case_		     =							list(SCREAMING_SNAKE_CASE_   )
									snake_case_		     =							conv_bias
									snake_case_		     =							num_conv_pos_embeddings
									snake_case_		     =							num_conv_pos_embedding_groups
									snake_case_		     =							len(self.conv_dim   )
									snake_case_		     =							num_hidden_layers
									snake_case_		     =							intermediate_size
									snake_case_		     =							hidden_act
									snake_case_		     =							num_attention_heads
									snake_case_		     =							hidden_dropout
									snake_case_		     =							attention_dropout
									snake_case_		     =							activation_dropout
									snake_case_		     =							feat_proj_dropout
									snake_case_		     =							final_dropout
									snake_case_		     =							layerdrop
									snake_case_		     =							layer_norm_eps
									snake_case_		     =							initializer_range
									snake_case_		     =							num_ctc_classes
									snake_case_		     =							vocab_size
									snake_case_		     =							do_stable_layer_norm
									snake_case_		     =							use_weighted_layer_sum
									snake_case_		     =							classifier_proj_size

									if (
									    (len(self.conv_stride   ) != self.num_feat_extract_layers)
									    or (len(self.conv_kernel   ) != self.num_feat_extract_layers)
									    or (len(self.conv_dim   ) != self.num_feat_extract_layers)
									):
														raise ValueError(
														    '''Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =='''
														    ''' `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ='''
														    F" {len(self.conv_dim   )}`, `len(config.conv_stride) = {len(self.conv_stride   )}`,"
														    F" `len(config.conv_kernel) = {len(self.conv_kernel   )}`."   )

									# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
									snake_case_		     =							apply_spec_augment
									snake_case_		     =							mask_time_prob
									snake_case_		     =							mask_time_length
									snake_case_		     =							mask_time_min_masks
									snake_case_		     =							mask_feature_prob
									snake_case_		     =							mask_feature_length
									snake_case_		     =							mask_feature_min_masks

									# parameters for pretraining with codevector quantized representations
									snake_case_		     =							num_codevectors_per_group
									snake_case_		     =							num_codevector_groups
									snake_case_		     =							contrastive_logits_temperature
									snake_case_		     =							feat_quantizer_dropout
									snake_case_		     =							num_negatives
									snake_case_		     =							codevector_dim
									snake_case_		     =							proj_codevector_dim
									snake_case_		     =							diversity_loss_weight

									# ctc loss
									snake_case_		     =							ctc_loss_reduction
									snake_case_		     =							ctc_zero_infinity

									# pretraining loss
									snake_case_		     =							replace_prob


				@property
				def     A_					(						self       :   int   ):
									return functools.reduce(operator.mul			,							self.conv_stride			,							1   )






from __future__ import annotations







def  lowerCAmelCase_	(lowerCAmelCase__:		int | str  ):





			"""simple docstring"""


			UpperCAmelCase_:		Optional[int]							      =     str(lowerCAmelCase__  )
			return n == n[::-1]







def  lowerCAmelCase_	(lowerCAmelCase__:		int = 1_0_0_0_0_0_0  ):





			"""simple docstring"""


			UpperCAmelCase_:		int							      =     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()))))






