def first_occ_index(array, n_at_least):
    """
    Getting index of first occurence in boolean array
    with at least n consecutive False entries
    """
    curr_found_false = 0
    curr_index = 0
    for index, elem in enumerate(array):
        if not elem:
            if curr_found_false == 0:
                curr_index = index
            curr_found_false += 1
            if curr_found_false == n_at_least:
                return curr_index
        else:
            curr_found_false = 0