#include <bits/stdc++.h>
using namespace std;
void in(int arr[], int n) {
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
}
int main() {
  int n;
  cin >> n;
  int arr1[n], arr2[n], arr3[n - 1], sum = 0, i, Max = 0;
  in(arr1, n);
  in(arr2, n);
  in(arr3, n - 1);
  for (i = 0; i < n; i++) {
    if (arr1[i] <= n) {
      int tem = arr1[i] - 1;
      sum += arr2[tem];
      if (Max < arr2[tem]) {
        Max = arr2[tem];
      }
    }
  }
  for (i = 0; i < n - 1; i++) {
    if (arr3[i] <= Max) sum += arr3[i];
  }
  cout << sum << endl;
  return 0;
}
