



def      __lowercase       (			a__ = 3							,       a__ = 7							,       a__ = 1_00_00_00       )    ->			Any:
							__SCREAMING_SNAKE_CASE									= 0
							__SCREAMING_SNAKE_CASE									= 1

							for current_denominator in range(1							,       limit + 1       ):
														__SCREAMING_SNAKE_CASE									= current_denominator * numerator // denominator
														if current_denominator % denominator == 0:
																					current_numerator -= 1
														if current_numerator * max_denominator > current_denominator * max_numerator:
																					__SCREAMING_SNAKE_CASE									= current_numerator
																					__SCREAMING_SNAKE_CASE									= current_denominator
							return max_numerator


if __name__ == "__main__":
			print(solution(numerator=3, denominator=7, limit=1000000))











import os






def      __lowercase       (			a__ = "input.txt"       )    ->			int:

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

							__SCREAMING_SNAKE_CASE									= len(a__       )
							__SCREAMING_SNAKE_CASE									= len(matrix[0]       )

							__SCREAMING_SNAKE_CASE									= [[-1 for _ in range(a__       )] for _ in range(a__       )]
							for i in range(a__       ):
														__SCREAMING_SNAKE_CASE									= matrix[i][0]

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

														for i in range(1							,       a__       ):
																					__SCREAMING_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       ):
																					__SCREAMING_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() = }''')






