import os
def 							lowerCAmelCase(     __lowerCamelCase = "input.txt"						):

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

					__a		 =       len(__lowerCamelCase						)
					__a		 =       len(matrix[0]						)

					__a		 =       [[-1 for _ in range(__lowerCamelCase						)] for _ in range(__lowerCamelCase						)]
					for i in range(__lowerCamelCase						):
										__a		 =       matrix[i][0]

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

										for i in range(1				,    __lowerCamelCase						):
															__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() = }''')





def 							lowerCAmelCase(     __lowerCamelCase						):
					if not all(char in '01' for char in bin_string						):
										raise ValueError('Non-binary value was passed to the function'						)
					if not bin_string:
										raise ValueError('Empty string was passed to the function'						)
					__a		 =       ''
					while len(__lowerCamelCase						) % 3 != 0:
										__a		 =       '0' + bin_string
					__a		 =       [
					    bin_string[index : index + 3]
					    for index in range(len(__lowerCamelCase						)						)
					    if index % 3 == 0
					]
					for bin_group in bin_string_in_3_list:
										__a		 =       0
										for index, val in enumerate(__lowerCamelCase						):
															oct_val += int(2 ** (2 - index) * int(__lowerCamelCase						)						)
										oct_string += str(__lowerCamelCase						)
					return oct_string


if __name__ == "__main__":
	from doctest import testmod

	testmod()




