def solution(power: int = 1000) -> int:
    """
    Returns the sum of the digits of the number `2 ^ power`.

    >>> solution(1000)
    1366
    >>> solution(50)
    76
    >>> solution(20)
    31
    >>> solution(15)
    26
    """

    if not isinstance(power, int):
        raise TypeError("The parameter `power` should be of type int.")

    if power < 0:
        raise ValueError("The value of `power` should be greater than or equal to 0.")

    n = 2 ** power
    digits = [int(digit) for digit in str(n)]

    return sum(digits)