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

  let sum = 0;
  satisfactionArray.forEach(function(value) {
    sum = sum + value;
  });

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

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