#include<iostream>

using namespace std;

int main() {
  int N,i;
  int a[20] = {0};
  int temp;
  int c[20] = {0};
  int sum = 0;
  int before=21;

  cin >> N;
  for (i=0;i<N;i++){
    cin >> a[i];
  }
  
  for (i=0;i<N;i++){
    cin >> temp;
    sum += temp
  }
  
  for (i =0;i<N;i++){
    cin >> c[i];
  }
  temp = a[0]; 
  for (i=1;i<N;i++){
    if (a[i] -temp == 1) {
      sum += c[a[i]-1];
    }
    temp = a[i];
  }
  
  cout << sum;
  
  return 0;
}
