def binary_search():
    (lo, hi) = (1, (t + 1))
    while ((lo + 1) < hi):
        x = ((lo + hi) // 2)
        if (min_time(x) > t):
            hi = x
        else:
            lo = x
    return lo
def binary_search():
    (lo, hi) = (1, (t + 1))
    while ((lo + 1) < hi):
        x = ((lo + hi) // 2)
        if (min_time(x) > t):
            hi = x
        else:
            lo = x
    return lo