def min_vacant_integer(lis):
    """
    >>> min_vacant_integer([])
    0
    >>> min_vacant_integer([1, 2, 3])
    0
    >>> min_vacant_integer([0, 1, 3])
    2
    >>> min_vacant_integer([0, 1, 2, 3])
    4
    """
    iset = set(lis)
    i = 0
    while 1:
        if i in iset:
            i += 1
            continue
        else:
            return i
