def get_viable_disks(space_needed, maximum, sorted_available):
    """Get number of disks that can fit at least space_needed."""
    disks_num = -1
    while space_needed <= maximum and disks_num == -1:
        try:
            disks_num = sorted_available.index(space_needed)
        except ValueError:
            space_needed += 1
    return disks_num, space_needed