from typing import List
from typing import Union


def instr_add(memory: List[int], cur_instr: int) -> Union[int, None]:
    """Execute add."""
    if cur_instr + 3 >= len(memory):
        raise IndexError(
            "Add at {} made out-of-bounds access".format(cur_instr)
        )
    value = memory[memory[cur_instr + 1]] + memory[memory[cur_instr + 2]]
    memory[memory[cur_instr + 3]] = value
    return 4