function main(input) {
  const args = input.split("\n");
  const N = args[0];
  const A = args[1].split(" ");
  const B = args[2].split(" ");
  const C = args[3].split(" ");
  var score = 0;
  for (var i = 0; i < Number(N); i++) {
    score = score + Number(B[Number(A[i])-1]);
    if(i !== Number(N)-1 && Number(A[i+1]) === Number(A[i]) +1) {
      score = score + Number(C[Number(A[i])-1]);
    }
  }
  console.log(score);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
