def f(x):
    return (1 / 3 * x * x * x) + (x * x) - (1 / 3 * x) - 1


def m_zerowe(a, b, d):
    while b - a > d and f(a) != 0 and f(b) != 0:
        c = (a + b) / 2
        if f(a) * f(b) < 0:
            b = c
        else:
            a = c
    if f(a) == 0:
        return a
    if f(b) == 0:
        return b
    return (a + b) / 2
