function Main(input) {
  input = input.split("\n");
  n = input[0].split(" ");
  d = input[1].split(" ");
  v = input[2].split(" ");
  p = input[3].split(" ");
  var r=-1;
  var ans=0;
  for(var i=0; i<n; i++){
    ans=ans+Number(v[d[i]-1]);
    if (r==d[i]-1){
      ans=ans+Number(p[r-1]);
    }
    r=d[i];
  }
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));