





'''simple docstring'''


def 						__a(SCREAMING_SNAKE_CASE_	:       int = 1		,							SCREAMING_SNAKE_CASE_	:       int = 1000     ):



    '''simple docstring'''





    _lowerCAmelCase						      =   1
    _lowerCAmelCase						      =   0

    for divide_by_number in range(SCREAMING_SNAKE_CASE_		,							digit + 1     ):
        _lowerCAmelCase						      =   []
        _lowerCAmelCase						      =   numerator
        for _ in range(1		,							digit + 1     ):
            if now_divide in has_been_divided:
                if longest_list_length < len(SCREAMING_SNAKE_CASE_     ):
                    _lowerCAmelCase						      =   len(SCREAMING_SNAKE_CASE_     )
                    _lowerCAmelCase						      =   divide_by_number
            else:
                has_been_divided.append(SCREAMING_SNAKE_CASE_     )
                _lowerCAmelCase						      =   now_divide * 10 % divide_by_number

    return the_digit


# Tests
if __name__ == "__main__":
       import doctest

       doctest.testmod()









'''simple docstring'''




import os




def 						__lowerCamelCase			(	UpperCAmelCase_ = "input.txt"							)   ->int:

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

	snake_case__	       =   len(UpperCAmelCase_							)
	snake_case__	       =   len(matrix[0]							)

	snake_case__	       =   [[-1 for _ in range(UpperCAmelCase_							)] for _ in range(UpperCAmelCase_							)]
	for i in range(UpperCAmelCase_							):
		snake_case__	       =   matrix[i][0]

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

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

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



