
"""simple docstring"""




import os


def     __magic_name__      ( __snake_case							:			str = "input.txt"    )					->							int:

       with open(os.path.join(os.path.dirname(__snake_case    )	,					__snake_case    )    ) as input_file:
              lowercase       :							Union[str, Any]									=				[
                  [int(__snake_case    ) for element in line.split(","    )]
                  for line in input_file.readlines()
              ]

       lowercase       :							str									=				len(__snake_case    )
       lowercase       :							Optional[Any]									=				len(matrix[0]    )

       lowercase       :							str									=				[[-1 for _ in range(__snake_case    )] for _ in range(__snake_case    )]
       for i in range(__snake_case    ):
              lowercase       :							Optional[int]									=				matrix[i][0]

       for j in range(1	,					__snake_case    ):
              for i in range(__snake_case    ):
                     lowercase       :							List[str]									=				minimal_path_sums[i][j - 1] + matrix[i][j]

              for i in range(1	,					__snake_case    ):
                     lowercase       :							Optional[int]									=				min(
                         minimal_path_sums[i][j]	,					minimal_path_sums[i - 1][j] + matrix[i][j]    )

              for i in range(rows - 2	,					-1	,					-1    ):
                     lowercase       :							int									=				min(
                         minimal_path_sums[i][j]	,					minimal_path_sums[i + 1][j] + matrix[i][j]    )

       return min(minimal_path_sums_row[-1] for minimal_path_sums_row in minimal_path_sums    )


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




"""simple docstring"""




def     __magic_name__      ( __snake_case							:			int	,					__snake_case							:			int    )					->							Any:
       if b == 0:
              return 1
       if (b % 2) == 0:
              return actual_power(__snake_case	,					int(b / 2    )    ) * actual_power(__snake_case	,					int(b / 2    )    )
       else:
              return a * actual_power(__snake_case	,					int(b / 2    )    ) * actual_power(__snake_case	,					int(b / 2    )    )


def     __magic_name__      ( __snake_case							:			int	,					__snake_case							:			int    )					->							float:
       if b < 0:
              return 1 / actual_power(__snake_case	,					__snake_case    )
       return actual_power(__snake_case	,					__snake_case    )


if __name__ == "__main__":
   print(power(-2, -3))


