#include <bits/stdc++.h>
using namespace std;
int a[100], b[100], c[100];
int main() {
  int n;
  while (cin >> n) {
    memset(a, 0, sizeof a);
    memset(b, 0, sizeof b);
    memset(c, 0, sizeof c);
    for (int i = 1; i <= n; ++i) {
      int x;
      cin >> x;
      a[x] = i;
    }
    for (int i = 1; i <= n; ++i) {
      int x;
      cin >> x;
      b[a[i]] = x;
    }
    for (int i = 1; i <= n - 1; ++i) {
      int x;
      cin >> x;
      c[a[i]] = x;
    }
    int ans = 0;
    for (int i = 1; i <= n; ++i) {
      if (i > 1) {
        ans += b[i] + c[i - 1];
      } else {
        ans += b[i];
      }
    }
    cout << ans << '\n';
  }
}
