



from __future__ import annotations

from math import ceil, floor, sqrt





def      __snake_case	(			_UpperCAmelCase = 2000000				):
    __a						       =				[0]
    __a						       =				42

    for idx in range(1   , ceil(sqrt(target * 2				) * 1.1				)				):
        triangle_numbers.append(triangle_numbers[-1] + idx				)

    # we want this to be as close as possible to target
    __a						       =				0
    # the area corresponding to the grid that gives the product closest to target
    __a						       =				0
    # an estimate of b, using the quadratic formula
    __a						       =				42
    # the largest integer less than b_estimate
    __a						       =				42
    # the largest integer less than b_estimate
    __a						       =				42
    # the triangle number corresponding to b_floor
    __a						       =				42
    # the triangle number corresponding to b_ceil
    __a						       =				42

    for idx_a, triangle_a in enumerate(triangle_numbers[1:]   , 1				):
        __a						       =				(-1 + sqrt(1 + 8 * target / triangle_a				)) / 2
        __a						       =				floor(__lowerCAmelCase				)
        __a						       =				ceil(__lowerCAmelCase				)
        __a						       =				triangle_numbers[b_floor]
        __a						       =				triangle_numbers[b_ceil]

        if abs(target - triangle_b_first_guess * triangle_a				) < abs(
            target - best_product				):
            __a						       =				triangle_b_first_guess * triangle_a
            __a						       =				idx_a * b_floor

        if abs(target - triangle_b_second_guess * triangle_a				) < abs(
            target - best_product				):
            __a						       =				triangle_b_second_guess * triangle_a
            __a						       =				idx_a * b_ceil

    return area


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









'''simple docstring'''


def        __lowerCAmelCase       (__lowerCAmelCase					,       __lowerCAmelCase      ):

		if density <= 0:
				raise ValueError("Impossible fluid density"      )
		if bulk_modulus <= 0:
				raise ValueError("Impossible bulk modulus"      )

		return (bulk_modulus / density) ** 0.5


if __name__ == "__main__":
						import doctest

						doctest.testmod()



