


import os





def __UpperCAmelCase							(		__A = "input.txt"      )    ->       int:



       '''simple docstring'''





       with open(os.path.join(os.path.dirname(SCREAMING_SNAKE_CASE_      )			,    SCREAMING_SNAKE_CASE_      )      ) as input_file:
              UpperCAmelCase__					    =  [
                  [int(SCREAMING_SNAKE_CASE_      ) for element in line.split(","      )]
                  for line in input_file.readlines()
              ]

       UpperCAmelCase__					    =  len(SCREAMING_SNAKE_CASE_      )
       UpperCAmelCase__					    =  len(matrix[0]      )

       UpperCAmelCase__					    =  [[-1 for _ in range(SCREAMING_SNAKE_CASE_      )] for _ in range(SCREAMING_SNAKE_CASE_      )]
       for i in range(SCREAMING_SNAKE_CASE_      ):
              UpperCAmelCase__					    =  matrix[i][0]

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

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

              for i in range(rows - 2			,    -1			,    -1      ):
                     UpperCAmelCase__					    =  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'''
import numpy as np





def 			lowerCamelCase(							SCREAMING_SNAKE_CASE_     )		->		np.array:
			return 1 / (1 + np.exp(-vector     ))





def 			lowerCamelCase(							SCREAMING_SNAKE_CASE_     )		->		np.array:
			return vector * sigmoid(1.702 * vector     )


if __name__ == "__main__":
							import doctest

							doctest.testmod()




