






"""simple docstring"""





import os



def     __lowercase					(    a :				str = "matrix.txt" )					->					int:
      with open(os.path.join(os.path.dirname(a )       ,		a ) ) as in_file:
            __snake_case      :    List[Any]  			=in_file.read()

      __snake_case      :    Dict  			=[[int(a ) for cell in row.split(''',''' )] for row in data.strip().splitlines()]
      __snake_case      :    Optional[Any]  			=[[0 for cell in row] for row in grid]
      __snake_case      :    Union[str, Any]  			=len(grid[0] )

      __snake_case      :    Optional[Any]  			=[[0 for i in range(a )] for j in range(a )]
      __snake_case      :    Any  			=grid[0][0]
      for i in range(1       ,		a ):
            __snake_case      :    Optional[Any]  			=grid[0][i] + dp[0][i - 1]
      for i in range(1       ,		a ):
            __snake_case      :    List[str]  			=grid[i][0] + dp[i - 1][0]

      for i in range(1       ,		a ):
            for j in range(1       ,		a ):
                  __snake_case      :    str  			=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 typing import TYPE_CHECKING

from ...utils import _LazyModule


UpperCamelCase_	:				Union[str, Any]										= {"""tokenization_wav2vec2_phoneme""": ["""Wav2Vec2PhonemeCTCTokenizer"""]}


if TYPE_CHECKING:
    from .tokenization_wavaveca_phoneme import WavaVecaPhonemeCTCTokenizer
else:
    import sys

    UpperCamelCase_	:				List[Any]										= _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


