#include <iostream>
using namespace std;
int A[21] = {0}, B[21] = {0}, C[21] = {0};
int main()
{
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> A[i];
  for (int i = 1; i <= N; i++) cin >> B[i];
  for (int i = 1; i <= N; i++) cin >> C[i];

  int satisfied = 0;
  for (int i = 1; i <= N; i++) {
    int eaten = A[i];
    satisfied += B[eaten];
    if (A[i-1]==eaten-1) {
      satisfied += C[eaten-1];
    }
  }
  cout << satisfied << end;
}
