



'''simple docstring'''

def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						int							,		_SCREAMING_SNAKE_CASE					:						int							)      ->						int:







	"""simple docstring"""
	return int((input_a, input_a).count(0							) != 0							)






def 		_snake_case		( )      ->						None:







	"""simple docstring"""
	assert nand_gate(0							,		0							) == 1
	assert nand_gate(0							,		1							) == 1
	assert nand_gate(1							,		0							) == 1
	assert nand_gate(1							,		1							) == 0


if __name__ == "__main__":
				print(nand_gate(0, 0))
				print(nand_gate(0, 1))
				print(nand_gate(1, 0))
				print(nand_gate(1, 1))




'''simple docstring'''

from __future__ import annotations






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						int | str							)      ->						bool:







	"""simple docstring"""
	lowerCAmelCase   =     str(_SCREAMING_SNAKE_CASE							)
	return n == n[::-1]






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						int = 1_000_000							)      ->						Dict:







	"""simple docstring"""
	lowerCAmelCase   =     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()))))