'use strict';
function main(input) {
  let sum = 0;
  const arr = input.trim().split('\n');
  const a = arr[1].split(' ').map(x => Number(x));
  const b = arr[2].split(' ').map(x => Number(x)).map(x => sum += x);
  const c = arr[3].split(' ').map(x => Number(x));

  for (let i = 0; i < a.length; i ++) {
    if (a[i] + 1 === a[i + 1]) {
      sum += c[a[i] - 1];
    }
  }
  
  console.log(sum);
}

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