'''simple docstring'''





import numpy as np






class 				UpperCAmelCase :




    '''simple docstring'''







    def __init__(       self )							-> Union[str, Any]:
         SCREAMING_SNAKE_CASE					:			int    	=       (0, 0)
         SCREAMING_SNAKE_CASE					:			Tuple    	=       None
         SCREAMING_SNAKE_CASE					:			List[str]    	=       0
         SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       0
         SCREAMING_SNAKE_CASE					:			Dict    	=       0






    def __eq__(       self    ,							lowercase__ )							-> Optional[Any]:
         return self.position == cell.position






    def       _UpperCamelCase    (       self )							-> Dict:
         print(self.position )






class 				UpperCAmelCase :




    '''simple docstring'''







    def __init__(       self    ,							lowercase__=(5, 5) )							-> int:
         SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       np.zeros(__UpperCamelCase )
         SCREAMING_SNAKE_CASE					:			Tuple    	=       world_size[0]
         SCREAMING_SNAKE_CASE					:			List[Any]    	=       world_size[1]






    def       _UpperCamelCase    (       self )							-> List[Any]:
         print(self.w )






    def       _UpperCamelCase    (       self    ,							lowercase__ )							-> Dict:
         SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       [
             (-1, -1),
             (-1, 0),
             (-1, 1),
             (0, -1),
             (0, 1),
             (1, -1),
             (1, 0),
             (1, 1),
         ]
         SCREAMING_SNAKE_CASE					:			List[str]    	=       cell.position[0]
         SCREAMING_SNAKE_CASE					:			List[Any]    	=       cell.position[1]
         SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       []
         for n in neughbour_cord:
              SCREAMING_SNAKE_CASE					:			Any    	=       current_x + n[0]
              SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       current_y + n[1]
              if 0 <= x < self.world_x_limit and 0 <= y < self.world_y_limit:
                   SCREAMING_SNAKE_CASE					:			Tuple    	=       Cell()
                   SCREAMING_SNAKE_CASE					:			Optional[int]    	=       (x, y)
                   SCREAMING_SNAKE_CASE					:			List[str]    	=       cell
                   neighbours.append(__UpperCamelCase )
         return neighbours






def     __lowerCAmelCase						(       a_       ,      a_       ,      a_		)      ->	Optional[int]:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Any    	=       []
     SCREAMING_SNAKE_CASE					:			Dict    	=       []
     _open.append(UpperCAmelCase__		)

     while _open:
          SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       np.argmin([n.f for n in _open]		)
          SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       _open[min_f]
          _closed.append(_open.pop(UpperCAmelCase__		)		)
          if current == goal:
               break
          for n in world.get_neigbours(UpperCAmelCase__		):
               for c in _closed:
                    if c == n:
                         continue
               SCREAMING_SNAKE_CASE					:			Tuple    	=       current.g + 1
               SCREAMING_SNAKE_CASE	,   SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       n.position
               SCREAMING_SNAKE_CASE	,   SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       goal.position
               SCREAMING_SNAKE_CASE					:			Dict    	=       (ya - ya) ** 2 + (xa - xa) ** 2
               SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       n.h + n.g

               for c in _open:
                    if c == n and c.f < n.f:
                         continue
               _open.append(UpperCAmelCase__		)
     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       []
     while current.parent is not None:
          path.append(current.position		)
          SCREAMING_SNAKE_CASE					:			Any    	=       current.parent
     path.append(current.position		)
     return path[::-1]


if __name__ == "__main__":
 _lowerCAmelCase  :int  				=    Gridworld()
 # Start position and goal
 _lowerCAmelCase  :Any  				=    Cell()
 _lowerCAmelCase  :str  				=    (0, 0)
 _lowerCAmelCase  :Any  				=    Cell()
 _lowerCAmelCase  :str  				=    (4, 4)
 print(f"""path from {start.position} to {goal.position}""")
 _lowerCAmelCase  :str  				=    astar(world, start, goal)
 #   Just for visual reasons.
 for i in s:
  _lowerCAmelCase  :int  				=    1
 print(world.w)

'''simple docstring'''





def     __lowerCAmelCase						(       a_ = 1000		)      ->	int:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       2**power
     SCREAMING_SNAKE_CASE					:			Any    	=       str(a_		)
     SCREAMING_SNAKE_CASE					:			int    	=       list(a_		)
     SCREAMING_SNAKE_CASE					:			Any    	=       0

     for i in list_num:
          sum_of_num += int(a_		)

     return sum_of_num


if __name__ == "__main__":
 _lowerCAmelCase  :Tuple  				=    int(input("""Enter the power of 2: """).strip())
 print("""2 ^ """, power, """ = """, 2**power)
 _lowerCAmelCase  :int  				=    solution(power)
 print("""Sum of the digits is: """, result)



