'''simple docstring'''





import math


def      a__ (		__UpperCamelCase				):
      SCREAMING_SNAKE_CASE_          =  math.loga(math.sqrt(4 * positive_integer + 1				) / 2 + 1 / 2				)

      return exponent == int(__UpperCamelCase				)


def      a__ (		__UpperCamelCase = 1 / 1_2_3_4_5				):
      SCREAMING_SNAKE_CASE_          =  0
      SCREAMING_SNAKE_CASE_          =  0

      SCREAMING_SNAKE_CASE_          =  3
      while True:
            SCREAMING_SNAKE_CASE_          =  (integer**2 - 1) / 4
            # if candidate is an integer, then there is a partition for k
            if partition_candidate == int(__UpperCamelCase				):
                  SCREAMING_SNAKE_CASE_          =  int(__UpperCamelCase				)
                  total_partitions += 1
                  if check_partition_perfect(__UpperCamelCase				):
                        perfect_partitions += 1
            if perfect_partitions > 0:
                  if perfect_partitions / total_partitions < max_proportion:
                        return int(__UpperCamelCase				)
            integer += 1


if __name__ == "__main__":
      print(f"{solution() = }")



from __future__ import annotations


def      a__ (		__UpperCamelCase				):
      SCREAMING_SNAKE_CASE_          =  str(__UpperCamelCase				)
      return n == n[::-1]


def      a__ (		__UpperCamelCase = 1_0_0_0_0_0_0				):
      SCREAMING_SNAKE_CASE_          =  0

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


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


