'''simple docstring'''

import math


def __a (	__lowerCamelCase			:						Tuple ,		__lowerCamelCase			:						List[str]				)	->							List[Any]:
      '''simple docstring'''


      if 0 not in (x, y):
            # We use the relation x^y = y*log10(x), where 10 is the base.
            return y * math.logaa(__lowerCamelCase				)
      else:
            if x == 0:  # 0 raised to any number is 0
                  return 0
            elif y == 0:
                  return 1  # any number raised to 0 is 1
      raise AssertionError("This should never happen"				)


if __name__ == "__main__":  # Main function
       # Read two numbers from input and typecast them to int using map function.
       # Here x is the base and y is the power.
       lowerCAmelCase_ : Optional[Any]						  =      "Enter the base and the power separated by a comma: "
       lowerCAmelCase_  ,					lowerCAmelCase_ : Any						  =      map(int, input(prompt).split(","))
       lowerCAmelCase_  ,					lowerCAmelCase_ : List[str]						  =      map(int, input(prompt).split(","))

       # We find the log of each number, using the function res(), which takes two
       # arguments.
       lowerCAmelCase_ : str						  =      res(xa, ya)
       lowerCAmelCase_ : List[Any]						  =      res(xa, ya)

       # We check for the largest number
       if resa > resa:
              print("Largest number is", xa, "^", ya)
       elif resa > resa:
              print("Largest number is", xa, "^", ya)
       else:
              print("Both are equal")







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






