#include <bits/stdc++.h>
using namespace std;
int INF = 0x3f3f3f3f;
int mod = 1e9 + 7;
int MAXN = 12345;
double eps = 1e-7;
int dcmp(double a, double b) { return (a - b < eps) ? -1 : (a - b >= eps); }
bool et[22];
int ord[22];
int b[22], c[22];
bool eatall(int ord) {
  for (int i = 1; i < ord; ++i)
    if (!et[i]) return false;
  return true;
}
int main(int argc, char **argv) {
  ios::sync_with_stdio(false);
  int n, m;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &ord[i]);
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &b[i]);
    ans += b[i];
  }
  for (int i = 0; i < n - 1; ++i) {
    scanf("%d", &c[i]);
  }
  memset(et, 0, sizeof(et));
  for (int i = 0; i < n; ++i) {
    if (eatall(ord[i])) {
      ans += c[ord[i] - 2];
    }
    et[ord[i]] = 1;
  }
  printf("%d\n", ans);
  return 0;
}
