


"""simple docstring"""
from math import factorial, radians






def 		lowercase							(     _snake_case						:      float     ,   _snake_case						:      int = 18     ,   _snake_case						:      int = 10     )     ->float:
	"""simple docstring"""





	__snake_case	:						Any						=				angle_in_degrees - ((angle_in_degrees // 360.0) * 360.0)

	# Converting from degrees to radians
	__snake_case	:						int						=				radians(_snake_case     )

	__snake_case	:						str						=				angle_in_radians
	__snake_case	:						Optional[int]						=				3
	__snake_case	:						List[Any]						=				-1

	for _ in range(_snake_case     ):
		result += (b * (angle_in_radians**a)) / factorial(_snake_case     )

		__snake_case	:						int						=				-b  # One positive term and the next will be negative and so on...
		a += 2  # Increased by 2 for every term.

	return round(_snake_case     ,   _snake_case     )


if __name__ == "__main__":
			__import__("""doctest""").testmod()









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





