#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[n], b[n], c[n - 1];
  for (long long i = 0; i < (long long)n; i++) cin >> a[i];
  for (long long i = 0; i < (long long)n; i++) cin >> b[i];
  for (long long i = 0; i < (long long)n - 1; i++) cin >> c[i];
  int res = 0;
  for (long long i = 0; i < (long long)n; i++) {
    res += b[a[i] - 1];
    if (i > 0) {
      if (a[i] - a[i - 1] == 1) res += c[a[i] - 2];
    }
  }
  cout << &c[0] << endl;
}
