



'''simple docstring'''

def       __lowercase  (_SCREAMING_SNAKE_CASE      :float    ,	_SCREAMING_SNAKE_CASE      :float    ,	_SCREAMING_SNAKE_CASE      :float    ,	_SCREAMING_SNAKE_CASE      :float    ,	_SCREAMING_SNAKE_CASE      :float    ,	):
				SCREAMING_SNAKE_CASE  :						int      					= [redshift, radiation_density, matter_density, dark_energy]
				if any(p < 0 for p in parameters       ):
								raise ValueError('''All input parameters must be positive'''       )

				if any(p > 1 for p in parameters[1:4]       ):
								raise ValueError('''Relative densities cannot be greater than one'''       )
				else:
								SCREAMING_SNAKE_CASE  :						Dict      					= 1 - (matter_density + radiation_density + dark_energy)

								SCREAMING_SNAKE_CASE  :						Any      					= (
								    radiation_density * (redshift + 1) ** 4
								    + matter_density * (redshift + 1) ** 3
								    + curvature * (redshift + 1) ** 2
								    + dark_energy
								)

								SCREAMING_SNAKE_CASE  :						int      					= hubble_constant * e_a ** (1 / 2)
								return hubble


if __name__ == "__main__":
	import doctest

	# run doctest
	doctest.testmod()

	# demo LCDM approximation
	snake_case_			=     0.3

	print(
	    hubble_parameter(
	        hubble_constant=68.3,
	        radiation_density=1E-4,
	        matter_density=matter_density,
	        dark_energy=1 - matter_density,
	        redshift=0,
	    )
	)









'''simple docstring'''

from __future__ import annotations






def       __lowercase  (_SCREAMING_SNAKE_CASE      :int | str       ):
				SCREAMING_SNAKE_CASE  :						int      					= str(_SCREAMING_SNAKE_CASE       )
				return n == n[::-1]






def       __lowercase  (_SCREAMING_SNAKE_CASE      :int = 1_00_00_00       ):
				SCREAMING_SNAKE_CASE  :						int      					= 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()))))




