

import numpy as np
def      a      (			A__	:   Optional[int]      ,   A__	:   Optional[Any]      ,   A__	:   Union[str, Any]      ,   A__	:   str      ,   A__	:   Any     )    ->      Union[str, Any]:





      """simple docstring"""



      _lowercase	       =int(np.ceil((x_end - xa) / h     )     )
      _lowercase	       =np.zeros((n + 1,)     )
      _lowercase	       =ya
      _lowercase	       =xa

      for k in range(A__     ):
            _lowercase	       =f(A__      ,   y[k]     )
            _lowercase	       =f(x + 0.5 * h      ,   y[k] + 0.5 * h * ka     )
            _lowercase	       =f(x + 0.5 * h      ,   y[k] + 0.5 * h * ka     )
            _lowercase	       =f(x + h      ,   y[k] + h * ka     )
            _lowercase	       =y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
            x += h

      return y


if __name__ == "__main__":
  import doctest

  doctest.testmod()





import os
def      a      (			A__	:   str = "input.txt"     )    ->      int:





      """simple docstring"""



      with open(os.path.join(os.path.dirname(A__     )      ,   A__     )     ) as input_file:
            _lowercase	       =[
                [int(A__     ) for element in line.split(','     )]
                for line in input_file.readlines()
            ]

      _lowercase	       =len(A__     )
      _lowercase	       =len(matrix[0]     )

      _lowercase	       =[[-1 for _ in range(A__     )] for _ in range(A__     )]
      for i in range(A__     ):
            _lowercase	       =matrix[i][0]

      for j in range(1      ,   A__     ):
            for i in range(A__     ):
                  _lowercase	       =minimal_path_sums[i][j - 1] + matrix[i][j]

            for i in range(1      ,   A__     ):
                  _lowercase	       =min(
                      minimal_path_sums[i][j]      ,   minimal_path_sums[i - 1][j] + matrix[i][j]     )

            for i in range(rows - 2      ,   -1      ,   -1     ):
                  _lowercase	       =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() = }")


