
import argparse

import torch

from ...utils import logging
from . import AlbertConfig, AlbertForPreTraining, load_tf_weights_in_albert


logging.set_verbosity_info()



def        UpperCamelCase    (							lowerCAmelCase__ ,			lowerCAmelCase__ ,			lowerCAmelCase__		):
					'''simple docstring'''
					lowercase							=						AlbertConfig.from_json_file(_snake_case		)
					print(f'Building PyTorch model from configuration: {config}'		)
					lowercase							=						AlbertForPreTraining(_snake_case		)

					# Load weights from tf checkpoint
					load_tf_weights_in_albert(_snake_case ,			_snake_case ,			_snake_case		)

					# Save pytorch-model
					print(f'Save PyTorch model to {pytorch_dump_path}'		)
					torch.save(model.state_dict() ,			_snake_case		)


if __name__ == "__main__":
							lowercase__		:Optional[Any]   =    argparse.ArgumentParser()
							# Required parameters
							parser.add_argument(
							    "--tf_checkpoint_path", default=None, type=str, required=True, help="Path to the TensorFlow checkpoint path."
							)
							parser.add_argument(
							    "--albert_config_file",
							    default=None,
							    type=str,
							    required=True,
							    help=(
							        "The config json file corresponding to the pre-trained ALBERT model. \n"
							        "This specifies the model architecture."
							    ),
							)
							parser.add_argument(
							    "--pytorch_dump_path", default=None, type=str, required=True, help="Path to the output PyTorch model."
							)
							lowercase__		:Union[str, Any]   =    parser.parse_args()
							convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.albert_config_file, args.pytorch_dump_path)








"""simple docstring"""
from __future__ import annotations






def 		lowercase							(     _snake_case						:      int | str     )     ->bool:
	"""simple docstring"""





	__snake_case	:						List[str]						=				str(_snake_case     )
	return n == n[::-1]






def 		lowercase							(     _snake_case						:      int = 1_000_000     )     ->str:
	"""simple docstring"""





	__snake_case	:						Union[str, Any]						=				0

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


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





