#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, z = 0, x;
  cin >> n;
  int n1 = n - 1;
  int p[100] = {0};
  for (int i = 0; i < n; i++) cin >> p[i];
  int t = 1;
  for (int i = 0; i < n; i++) {
    cin >> x;
    z += x;
  }
  for (int i = 0; i < n1; i++) {
    cin >> x;
    for (int i = 0; i < n; i++)
      if (p[i] == t && p[i + 1] == t + 1) {
        z += x;
        break;
      }
  }
  cout << z;
  return 0;
}
