






"""simple docstring"""





import os


def       a__					(					_SCREAMING_SNAKE_CASE = "input.txt"    ):




		"""simple docstring"""


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

		UpperCamelCase   =	len(UpperCamelCase__    )
		UpperCamelCase   =	len(matrix[0]    )

		UpperCamelCase   =	[[-1 for _ in range(UpperCamelCase__    )] for _ in range(UpperCamelCase__    )]
		for i in range(UpperCamelCase__    ):
				UpperCamelCase   =	matrix[i][0]

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

				for i in range(1  ,	UpperCamelCase__    ):
						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"""





def       a__					(					_SCREAMING_SNAKE_CASE    ):




		"""simple docstring"""


		return number & 1 == 0


if __name__ == "__main__":
						import doctest

						doctest.testmod()






