function Main(input) {
    var N = parseInt(input[0], 10);
    var A = input.slice(1, 2)[0].split(' ').map(n => parseInt(n));
    var B = input.slice(2, 3)[0].split(' ').map(n => parseInt(n));
    var C = input.slice(3, 4)[0].split(' ').map(n => parseInt(n));

    var result = 0;

    for(var i = 0; i < N; i++) {
        if (i === 0) {
            result += B[A[i] - 1];
        } else {
            result += B[A[i] - 1];
            if (A[i] - 1 === A[i - 1]) {
                result += C[A[i - 1] - 1];
            }
        }
    }
    console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n/));