



'''simple docstring'''





import os




def lowerCAmelCase						(__A = "input.txt"):



					"""simple docstring"""



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

					_a											=						len(__A)
					_a											=						len(matrix[0])

					_a											=						[[-1 for _ in range(__A)] for _ in range(__A)]
					for i in range(__A):
										_a											=						matrix[i][0]

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

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

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





# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


lowercase_	 =						open  # noqa: we just need to have a builtin inside this module to test it properly



