






'''simple docstring'''

import os







def 					lowercase__				(   __UpperCamelCase = "matrix.txt"					)->				int:
      with open(os.path.join(os.path.dirname(__UpperCamelCase					)	,		__UpperCamelCase					)					) as in_file:
            UpperCamelCase       						=      in_file.read()

      UpperCamelCase       						=      [[int(__UpperCamelCase					) for cell in row.split(""","""					)] for row in data.strip().splitlines()]
      UpperCamelCase       						=      [[0 for cell in row] for row in grid]
      UpperCamelCase       						=      len(grid[0]					)

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

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

      return dp[-1][-1]


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








'''simple docstring'''

def 					lowercase__				(   __UpperCamelCase					)->				str:
      if not all(char in """01""" for char in bin_string					):
            raise ValueError("""Non-binary value was passed to the function"""					)
      if not bin_string:
            raise ValueError("""Empty string was passed to the function"""					)
      UpperCamelCase       						=      """"""
      while len(__UpperCamelCase					) % 3 != 0:
            UpperCamelCase       						=      """0""" + bin_string
      UpperCamelCase       						=      [
          bin_string[index : index + 3]
          for index in range(len(__UpperCamelCase					)					)
          if index % 3 == 0
      ]
      for bin_group in bin_string_in_3_list:
            UpperCamelCase       						=      0
            for index, val in enumerate(__UpperCamelCase					):
                  oct_val += int(2 ** (2 - index) * int(__UpperCamelCase					)					)
            oct_string += str(__UpperCamelCase					)
      return oct_string


if __name__ == "__main__":
     from doctest import testmod

     testmod()
