





"""simple docstring"""





from __future__ import annotations


def       a__					(					_SCREAMING_SNAKE_CASE    ):




		"""simple docstring"""


		UpperCamelCase   =	str(_SCREAMING_SNAKE_CASE    )
		return n == n[::-1]


def       a__					(					_SCREAMING_SNAKE_CASE = 1_000_000    ):




		"""simple docstring"""


		UpperCamelCase   =	0

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


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













"""simple docstring"""





def       a__					(					_SCREAMING_SNAKE_CASE    ):




		"""simple docstring"""


		UpperCamelCase   =	0
		for ch in input_str:
				UpperCamelCase   =	ord(_SCREAMING_SNAKE_CASE    )
				UpperCamelCase   =	pow(2  ,	_SCREAMING_SNAKE_CASE    )

				# If we already turned on bit for current character's unicode
				if bitmap >> ch_unicode & 1 == 1:
						return False
				bitmap |= ch_bit_index_on
		return True


if __name__ == "__main__":
						import doctest

						doctest.testmod()






