



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


a      :  Tuple			     =			logging.get_logger(__name__)

a      :  Optional[int]			     =			{
    'microsoft/biogpt': 'https://huggingface.co/microsoft/biogpt/resolve/main/config.json',
    # See all BioGPT models at https://huggingface.co/models?filter=biogpt
}







class 				_a				(   _lowerCAmelCase					):
			A      		=	'''biogpt'''

			def __init__(self,   SCREAMING_SNAKE_CASE_=42384,   SCREAMING_SNAKE_CASE_=1024,   SCREAMING_SNAKE_CASE_=24,   SCREAMING_SNAKE_CASE_=16,   SCREAMING_SNAKE_CASE_=4096,   SCREAMING_SNAKE_CASE_="gelu",   SCREAMING_SNAKE_CASE_=0.1,   SCREAMING_SNAKE_CASE_=0.1,   SCREAMING_SNAKE_CASE_=1024,   SCREAMING_SNAKE_CASE_=0.0_2,   SCREAMING_SNAKE_CASE_=1E-12,   SCREAMING_SNAKE_CASE_=True,   SCREAMING_SNAKE_CASE_=True,   SCREAMING_SNAKE_CASE_=0.0,   SCREAMING_SNAKE_CASE_=0.0,   SCREAMING_SNAKE_CASE_=1,   SCREAMING_SNAKE_CASE_=0,   SCREAMING_SNAKE_CASE_=2,   **SCREAMING_SNAKE_CASE_,   )       ->   Union[str, Any]:
						UpperCAmelCase_:		int							      =     vocab_size
						UpperCAmelCase_:		Union[str, Any]							      =     max_position_embeddings
						UpperCAmelCase_:		int							      =     hidden_size
						UpperCAmelCase_:		List[Any]							      =     num_hidden_layers
						UpperCAmelCase_:		List[Any]							      =     num_attention_heads
						UpperCAmelCase_:		Optional[Any]							      =     intermediate_size
						UpperCAmelCase_:		Tuple							      =     hidden_act
						UpperCAmelCase_:		Dict							      =     hidden_dropout_prob
						UpperCAmelCase_:		Dict							      =     attention_probs_dropout_prob
						UpperCAmelCase_:		Union[str, Any]							      =     initializer_range
						UpperCAmelCase_:		List[Any]							      =     layer_norm_eps
						UpperCAmelCase_:		Dict							      =     scale_embedding
						UpperCAmelCase_:		Optional[Any]							      =     use_cache
						UpperCAmelCase_:		int							      =     layerdrop
						UpperCAmelCase_:		Dict							      =     activation_dropout
						super().__init__(pad_token_id=SCREAMING_SNAKE_CASE_,   bos_token_id=SCREAMING_SNAKE_CASE_,   eos_token_id=SCREAMING_SNAKE_CASE_,   **SCREAMING_SNAKE_CASE_					)











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()))))






