






'''simple docstring'''

import os
def     __lowercase  (_lowercase = "matrix.txt"     )   ->     int:


     """simple docstring"""
     with open(os.path.join(os.path.dirname(_lowercase     ),						_lowercase     )     ) as in_file:
          __lowerCamelCase						:       Any				   =				in_file.read()

     __lowerCamelCase						:       Dict				   =				[[int(_lowercase     ) for cell in row.split(""","""     )] for row in data.strip().splitlines()]
     __lowerCamelCase						:       Optional[int]				   =				[[0 for cell in row] for row in grid]
     __lowerCamelCase						:       Optional[Any]				   =				len(grid[0]     )

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

     for i in range(1,						_lowercase     ):
          for j in range(1,						_lowercase     ):
               __lowerCamelCase						:       List[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'''

from __future__ import annotations

from typing import Any
def     __lowercase  (_lowercase     )   ->     int:


     """simple docstring"""
     if not postfix_notation:
          return 0

     __lowerCamelCase						:       Optional[int]				   =				{"""+""", """-""", """*""", """/"""}
     __lowerCamelCase						:       list[Any]				   =				[]

     for token in postfix_notation:
          if token in operations:
               __lowerCamelCase   ,      __lowerCamelCase						:       List[Any]				   =				stack.pop(), stack.pop()
               if token == "+":
                    stack.append(a + b     )
               elif token == "-":
                    stack.append(a - b     )
               elif token == "*":
                    stack.append(a * b     )
               else:
                    if a * b < 0 and a % b != 0:
                         stack.append(a // b + 1     )
                    else:
                         stack.append(a // b     )
          else:
               stack.append(int(_lowercase     )     )

     return stack.pop()


if __name__ == "__main__":
   import doctest

   doctest.testmod()



