"""simple docstring"""





import os


def    lowercase_   (   _lowerCamelCase:	str = "input.txt"      ) ->      int:



							'''simple docstring'''

							with open(os.path.join(os.path.dirname(_lowerCamelCase      )						,   _lowerCamelCase      )      ) as input_file:
														__lowerCamelCase					:		Optional[Any]		   =     [
														    [int(_lowerCamelCase      ) for element in line.split(","      )]
														    for line in input_file.readlines()
														]

							__lowerCamelCase					:		List[str]		   =     len(_lowerCamelCase      )
							__lowerCamelCase					:		Optional[int]		   =     len(matrix[0]      )

							__lowerCamelCase					:		Optional[Any]		   =     [[-1 for _ in range(_lowerCamelCase      )] for _ in range(_lowerCamelCase      )]
							for i in range(_lowerCamelCase      ):
														__lowerCamelCase					:		Optional[Any]		   =     matrix[i][0]

							for j in range(1						,   _lowerCamelCase      ):
														for i in range(_lowerCamelCase      ):
																					__lowerCamelCase					:		str		   =     minimal_path_sums[i][j - 1] + matrix[i][j]

														for i in range(1						,   _lowerCamelCase      ):
																					__lowerCamelCase					:		Tuple		   =     min(
																					    minimal_path_sums[i][j]						,   minimal_path_sums[i - 1][j] + matrix[i][j]      )

														for i in range(rows - 2						,   -1						,   -1      ):
																					__lowerCamelCase					:		Tuple		   =     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() = }""")
"""simple docstring"""





from functools import lru_cache


def    lowercase_   (   _lowerCamelCase:	int      ) ->      set:



							'''simple docstring'''

							__lowerCamelCase					:		Optional[Any]		   =     2
							__lowerCamelCase					:		Tuple		   =     set()
							while i * i <= n:
														if n % i:
																					i += 1
														else:
																					n //= i
																					factors.add(_lowerCamelCase      )
							if n > 1:
														factors.add(_lowerCamelCase      )
							return factors


@lru_cache
def    lowercase_   (   _lowerCamelCase:	int      ) ->      int:



							'''simple docstring'''

							return len(unique_prime_factors(_lowerCamelCase      )      )


def    lowercase_   (   _lowerCamelCase:	list      ) ->      bool:



							'''simple docstring'''

							return len(set(_lowerCamelCase      )      ) in (0, 1)


def    lowercase_   (   _lowerCamelCase:	int      ) ->      list:



							'''simple docstring'''

							__lowerCamelCase					:		str		   =     2

							while True:
														# Increment each value of a generated range
														__lowerCamelCase					:		int		   =     [base + i for i in range(_lowerCamelCase      )]

														# Run elements through out unique_prime_factors function
														# Append our target number to the end.
														__lowerCamelCase					:		Dict		   =     [upf_len(_lowerCamelCase      ) for x in group]
														checker.append(_lowerCamelCase      )

														# If all numbers in the list are equal, return the group variable.
														if equality(_lowerCamelCase      ):
																					return group

														# Increment our base variable by 1
														base += 1


def    lowercase_   (   _lowerCamelCase:	int = 4      ) ->      int:



							'''simple docstring'''

							__lowerCamelCase					:		Any		   =     run(_lowerCamelCase      )
							return results[0] if len(_lowerCamelCase      ) else None


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