using System;
using System.Linq;

public static class B
{
  public static void Main()
  {
    int n = int.Parse(Console.ReadLine());
    int[] a = Console.ReadLine().split(null).Select(s => int.Parse(s));
    int[] b = Console.ReadLine().split(null).Select(s => int.Parse(s));
    int[] c = Console.ReadLine().split(null).Select(s => int.Parse(s));
    int prev = -10, cur = -10, score = 0;
    for (int i = 0; i < n ; ++i)
    {
      cur = a[i];
      score += b[cur];
      if (prev == cur - 1)
      {
        score += c[prev];
      }
      prev = cur;
    }
    Console.WriteLine(score);
    return 0;
  }
}
