#include <bits/stdc++.h>
using namespace std;
int a[100], b[100], c[100];
int main() {
  int n;
  cin >> n;
  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, ant = 0;
  for (int i = 1; i <= n; ++i) {
    ans += b[i] + ant;
    ant = c[i];
  }
  cout << ans << '\n';
}
