using System;
using System.Linq;

namespace B_Buffet
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] A = Console.ReadLine()
                            .Split(' ')
                            .Select(s => int.Parse(s))
                            .ToArray();
            int[] B = Console.ReadLine()
                            .Split(' ')
                            .Select(s => int.Parse(s))
                            .ToArray();
            int[] C = Console.ReadLine()
                            .Split(' ')
                            .Select(s => int.Parse(s))
                            .ToArray();
            
            int satisfy = 0;
            satisfy += B.Sum();
            for (int i = 0; i < N - 1; i++)
            {
                if (A[i] = A[i + 1])
                {
                    satisfy += C[i];
                }
            }
            Console.WriteLine(satisfy.ToString());
        }
    }
}
