"""simple docstring"""
import os





def 				lowerCAmelCase__      (     _UpperCamelCase    :			str = "matrix.txt"   )   ->			int:





						"""simple docstring"""






						with open(os.path.join(os.path.dirname(_UpperCamelCase   )	,     _UpperCamelCase   )   ) as in_file:
												snake_case        =     in_file.read()

						snake_case        =     [[int(_UpperCamelCase   ) for cell in row.split(','   )] for row in data.strip().splitlines()]
						snake_case        =     [[0 for cell in row] for row in grid]
						snake_case        =     len(grid[0]   )

						snake_case        =     [[0 for i in range(_UpperCamelCase   )] for j in range(_UpperCamelCase   )]
						snake_case        =     grid[0][0]
						for i in range(1	,     _UpperCamelCase   ):
												snake_case        =     grid[0][i] + dp[0][i - 1]
						for i in range(1	,     _UpperCamelCase   ):
												snake_case        =     grid[i][0] + dp[i - 1][0]

						for i in range(1	,     _UpperCamelCase   ):
												for j in range(1	,     _UpperCamelCase   ):
																		snake_case        =     grid[i][j] + min(dp[i - 1][j]	,     dp[i][j - 1]   )

						return dp[-1][-1]


if __name__ == "__main__":
					print(f"""{solution() = }""")



"""simple docstring"""
from ..utils import DummyObject, requires_backends



class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Dict     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Optional[Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Optional[Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Optional[int]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Dict     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Optional[int]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Any     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      List[Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      str     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Tuple     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      str     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Tuple     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Any     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Tuple     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Tuple     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      int     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Any     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Optional[int]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      int     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Dict     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Any     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Union[str, Any]     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      str     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Dict     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )





class 					lowerCAmelCase_      (     metaclass=lowerCAmelCase   ):



				"""simple docstring"""
				_lowerCAmelCase       :      Tuple     					=  ["""sentencepiece"""]

				def __init__(			self						,      *lowerCAmelCase						,      **lowerCAmelCase      ):






										"""simple docstring"""

										requires_backends(self						,      ['sentencepiece']      )


