
"""simple docstring"""






from __future__ import annotations



def      lowerCAmelCase__			(		__magic_name__      )						->bool:
			__lowercase       =       str(__magic_name__      )
			return n == n[::-1]



def      lowerCAmelCase__			(		__magic_name__ = 1_0_0_0_0_0_0      )						->Dict:
			__lowercase       =       0

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


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







"""simple docstring"""






def      lowerCAmelCase__			(		__magic_name__      )						->int:

			if not isinstance(__magic_name__			,   __magic_name__      ):
						raise ValueError("multiplicative_persistence() only accepts integral values"      )
			if num < 0:
						raise ValueError("multiplicative_persistence() does not accept negative values"      )

			__lowercase       =       0
			__lowercase       =       str(__magic_name__      )

			while len(__magic_name__      ) != 1:
						__lowercase       =       [int(__magic_name__      ) for i in num_string]

						__lowercase       =       1
						for i in range(0			,   len(__magic_name__      )      ):
									total *= numbers[i]

						__lowercase       =       str(__magic_name__      )

						steps += 1
			return steps



def      lowerCAmelCase__			(		__magic_name__      )						->int:

			if not isinstance(__magic_name__			,   __magic_name__      ):
						raise ValueError("additive_persistence() only accepts integral values"      )
			if num < 0:
						raise ValueError("additive_persistence() does not accept negative values"      )

			__lowercase       =       0
			__lowercase       =       str(__magic_name__      )

			while len(__magic_name__      ) != 1:
						__lowercase       =       [int(__magic_name__      ) for i in num_string]

						__lowercase       =       0
						for i in range(0			,   len(__magic_name__      )      ):
									total += numbers[i]

						__lowercase       =       str(__magic_name__      )

						steps += 1
			return steps


if __name__ == "__main__":
					import doctest

					doctest.testmod()





