




'''simple docstring'''





from itertools import product





def UpperCAmelCase						(					UpperCAmelCase_ = 15	):
    _a							:       float       					=			0.0
    _a							:       float
    _a							:       int
    _a							:       int
    _a							:       int
    _a							:       int
    _a							:       tuple[int, ...]

    for series in product(range(2	)      ,  repeat=UpperCAmelCase_	):
        _a							:       int       					=			series.count(1	)
        _a							:       List[str]       					=			num_turns - num_blue
        if num_red >= num_blue:
            continue
        _a							:       List[Any]       					=			1.0
        for ind, col in enumerate(UpperCAmelCase_      ,  2	):
            if col == 0:
                prob *= (ind - 1) / ind
            else:
                prob *= 1 / ind

        total_prob += prob

    return int(1 / total_prob	)


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








'''simple docstring'''





from math import exp





def UpperCAmelCase						(					UpperCAmelCase_	):
    return 8 * x - 2 * exp(-x	)





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_      ,  UpperCAmelCase_	):
    _a							:       Optional[int]       					=			lower_bound
    _a							:       str       					=			upper_bound
    for _ in range(0      ,  UpperCAmelCase_	):
        _a					,   _a							:       List[str]       					=			xa, xa - (f(UpperCAmelCase_	) * (xa - xa)) / (f(UpperCAmelCase_	) - f(UpperCAmelCase_	))
    return xa


if __name__ == "__main__":
  print(F"""Example: {secant_method(1, 3, 2)}""")


