from typing import List


def load_message(length: int) -> List[int]:
    """Loads array of bits.

    Repeats requests until user enters a message of length `length` or greater.
    All entered characters must be `0` or `1`.

    Args:
        length (int): minimum length of message

    Returns:
        List[int]: list of first `length` loaded bits
    """

    while True:
        print("d = ", end="")

        try:
            s = input()
            d = []
            for i_ in s:
                i = int(i_)
                if (i == 0 or i == 1):
                    d.append(i)
                else:
                    raise ValueError

            if len(d) < length:
                print(f"Message length must be at least {length}")
            else:
                return d[:length]

        except ValueError:
            print("Only characters '0' and '1' are allowed")