


"""simple docstring"""
def 		lowercase							(     _snake_case						:      list     )     ->list:
	"""simple docstring"""





	if len(_snake_case     ) <= 1:
		return [tuple(_snake_case     )]

	__snake_case	:						Tuple						=				[]

	def generate(_snake_case						:      int     ,   _snake_case						:      list     ):
		if k == 1:
			res.append(tuple(arr[:]     )     )
			return

		generate(k - 1     ,   _snake_case     )

		for i in range(k - 1     ):
			if k % 2 == 0:  # k is even
				__snake_case	,							__snake_case	:						Optional[Any]						=				arr[k - 1], arr[i]
			else:  # k is odd
				__snake_case	,							__snake_case	:						Dict						=				arr[k - 1], arr[0]
			generate(k - 1     ,   _snake_case     )

	generate(len(_snake_case     )     ,   _snake_case     )
	return res


if __name__ == "__main__":
			SCREAMING_SNAKE_CASE :    Dict									=				input("""Enter numbers separated by a comma:\n""").strip()
			SCREAMING_SNAKE_CASE :    Dict									=				[int(item) for item in user_input.split(""",""")]
			print(heaps(arr))









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





