





import os
def       snake_case_		(     lowerCAmelCase_       :						int = "input.txt"      ):


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

							__lowercase      :							Dict				=     len(lowerCamelCase__      )
							__lowercase      :							Optional[int]				=     len(matrix[0]      )

							__lowercase      :							int				=     [[-1 for _ in range(lowerCamelCase__      )] for _ in range(lowerCamelCase__      )]
							for i in range(lowerCamelCase__      ):
														__lowercase      :							List[str]				=     matrix[i][0]

							for j in range(1       ,       lowerCamelCase__      ):
														for i in range(lowerCamelCase__      ):
																					__lowercase      :							Optional[Any]				=     minimal_path_sums[i][j - 1] + matrix[i][j]

														for i in range(1       ,       lowerCamelCase__      ):
																					__lowercase      :							str				=     min(
																					    minimal_path_sums[i][j]       ,       minimal_path_sums[i - 1][j] + matrix[i][j]      )

														for i in range(rows - 2       ,       -1       ,       -1      ):
																					__lowercase      :							Dict				=     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       snake_case_		(     lowerCAmelCase_       :						int       ,       lowerCAmelCase_       :						int      ):
							return int((input_a, input_a).count(1      ) != 0      )
def       snake_case_		(     ):
							assert or_gate(0       ,       0      ) == 0
							assert or_gate(0       ,       1      ) == 1
							assert or_gate(1       ,       0      ) == 1
							assert or_gate(1       ,       1      ) == 1


if __name__ == "__main__":
	print(or_gate(0, 1))
	print(or_gate(1, 0))
	print(or_gate(0, 0))
	print(or_gate(1, 1))