
'''simple docstring'''




import os







def 		lowerCAmelCase_				(   snake_case__ = "matrix.txt"						):




    '''simple docstring'''



    with open(os.path.join(os.path.dirname(snake_case__						)		,				snake_case__						)						) as in_file:
        A       :   Dict					=						in_file.read()

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

    A       :   int					=						[[0 for i in range(snake_case__						)] for j in range(snake_case__						)]
    A       :   List[str]					=						grid[0][0]
    for i in range(1		,				snake_case__						):
        A       :   Any					=						grid[0][i] + dp[0][i - 1]
    for i in range(1		,				snake_case__						):
        A       :   Dict					=						grid[i][0] + dp[i - 1][0]

    for i in range(1		,				snake_case__						):
        for j in range(1		,				snake_case__						):
            A       :   Union[str, Any]					=						grid[i][j] + min(dp[i - 1][j]		,				dp[i][j - 1]						)

    return dp[-1][-1]


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






'''simple docstring'''




import os







def 		lowerCAmelCase_				(   ):




    '''simple docstring'''



    A       :   List[Any]					=						os.path.join(os.path.dirname(snake_case__						)		,				'''num.txt'''						)
    with open(snake_case__						) as file_hand:
        return str(sum(int(snake_case__						) for line in file_hand						)						)[:10]


if __name__ == "__main__":
      print(solution())




