def get_free_index(dictionary):
    """ Get the first free integer index of dictionary starting at 0. """
    index = 0
    while True:
        if index in dictionary:
            index += 1
        else:
            return index