function Main(input) {
	var data = input.split("\n")
	var n = data[0];
    var dish = data[1].split(" ").map((n) => parseInt(n, 10));
    var point = data[2].split(" ").map((n) => parseInt(n, 10));
    var bonus = data[3].split(" ").map((n) => parseInt(n, 10));
    
    var sum = 0;
    
    for(var i=0; i < n ;i++){
    	sum += point[i];
    	if(dish[i]+1 == dish[i+1]){
    		sum += bonus[dish[i]-1];
    	}
    }
    console.log(sum)
}
 
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));