using System;
using System.Linq;
using System.Collections.Generic;

public class Hello{
    public static void Main(){
        var num = int.Parse(Console.ReadLine());
        var a = ReadList();
        var b = ReadList();
        var c = ReadList();
        
        c.Add(0);
        
        int satisfy = 0;
        
        for(int i = 0; i < num; i++){
            satisfy += b[a[i] - 1];
            
            if(i != num -1){
                satisfy += c[a[i] - 1];
            }
        }
        
        Console.WriteLine(satisfy);
    }
    
    public static List<int> ReadList(){
        var a_text = Console.ReadLine().Split(' ');
        return a_text.Select(x => int.Parse(x)).ToList(); 
    }
}