





import os




def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE = "input.txt"	)       ->     int:

  with open(os.path.join(os.path.dirname(_SCREAMING_SNAKE_CASE	)	,		_SCREAMING_SNAKE_CASE	)	) as input_file:
    lowercase__			    =						[
        [int(_SCREAMING_SNAKE_CASE	) for element in line.split(','	)]
        for line in input_file.readlines()
    ]

  lowercase__			    =						len(_SCREAMING_SNAKE_CASE	)
  lowercase__			    =						len(matrix[0]	)

  lowercase__			    =						[[-1 for _ in range(_SCREAMING_SNAKE_CASE	)] for _ in range(_SCREAMING_SNAKE_CASE	)]
  for i in range(_SCREAMING_SNAKE_CASE	):
    lowercase__			    =						matrix[i][0]

  for j in range(1	,		_SCREAMING_SNAKE_CASE	):
    for i in range(_SCREAMING_SNAKE_CASE	):
      lowercase__			    =						minimal_path_sums[i][j - 1] + matrix[i][j]

    for i in range(1	,		_SCREAMING_SNAKE_CASE	):
      lowercase__			    =						min(
          minimal_path_sums[i][j]	,		minimal_path_sums[i - 1][j] + matrix[i][j]	)

    for i in range(rows - 2	,		-1	,		-1	):
      lowercase__			    =						min(
          minimal_path_sums[i][j]	,		minimal_path_sums[i + 1][j] + matrix[i][j]	)

  return min(minimal_path_sums_row[-1] for minimal_path_sums_row in minimal_path_sums	)


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









def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE = 50	)       ->     int:
  lowercase__			    =						[[0] * 3 for _ in range(length + 1	)]

  for row_length in range(length + 1	):
    for tile_length in range(2	,		5	):
      for tile_start in range(row_length - tile_length + 1	):
        different_colour_ways_number[row_length][tile_length - 2] += (
            different_colour_ways_number[row_length - tile_start - tile_length][
                tile_length - 2
            ]
            + 1
        )

  return sum(different_colour_ways_number[length]	)


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


