using namespace std;

int main(){
  int N;
  int a[100];
  int b[110];
  int c[110];
  cin >> N;
  for(int i = 0; i < N; ++i)cin >> a[i];
  for(int i = 0; i < N; ++i)cin >> b[i];
  for(int i = 0; i < N - 1; ++i)cin >> c[i];
  
  int total = 0;
  for(int i = 0; i < N; ++i){
    total += b[a[i]];
    if(a[i] != N || i != N-1){
      total += c[a[i]];
    }
  }
  cout << total << endl;
}
