from collections.abc import Sequence


def __a (	__lowerCamelCase			:						Sequence[float] ,		__lowerCamelCase			:						float				)	->							float:
      '''simple docstring'''


      return sum(c * (x**i) for i, c in enumerate(__lowerCamelCase				)				)


def __a (	__lowerCamelCase			:						Sequence[float] ,		__lowerCamelCase			:						float				)	->							float:
      '''simple docstring'''


      lowercase_     =      0.0
      for coeff in reversed(__lowerCamelCase				):
            lowercase_     =      result * x + coeff
      return result


if __name__ == "__main__":
       lowerCAmelCase_ : Any						  =      (0.0, 0.0, 5.0, 9.3, 7.0)
       lowerCAmelCase_ : Dict						  =      10.0
       print(evaluate_poly(poly, x))
       print(horner(poly, x))







'''simple docstring'''

from __future__ import annotations


def __a (	__lowerCamelCase			:						int | str				)	->							bool:
      '''simple docstring'''


      lowercase_     =      str(__lowerCamelCase				)
      return n == n[::-1]


def __a (	__lowerCamelCase			:						int = 1_000_000				)	->							Optional[int]:
      '''simple docstring'''


      lowercase_     =      0

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


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






