function Main(input) {
  input = input.split("\n");
  const n = input[0];
  const foodArray = input[1].split(" ");
  const satisfactionArray = input[2].split(" ");
  const additionalArray = input[3].split(" ");

  var sum = 0;
  for(var i = 0; i < n; i ++) {
    sum = sum + Number(satisfactionArray[i]);
  }

  var finalSum = sum;
  for(var i = 0; i < n - 1; i ++) {
    if (Number(foodArray[i + 1]) - Number(foodArray[i]) === 1) {
      finalSum = finalSum + Number(additionalArray[Number(foodArray[i]) - 1]);
    }
  }
  console.log(finalSum);

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