#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000007;
long long modx(long long a) { return (a % MOD + MOD) % MOD; }
long long times(long long a, long long b) { return modx(modx(a) * modx(b)); }
long long add(long long a, long long b) { return modx(modx(a) + modx(b)); }
long long sub(long long a, long long b) {
  return modx(MOD + modx(a) - modx(b));
}
long long fastExp(long long base, long long exp) {
  if (exp == 0LL) {
    return 1LL;
  }
  if (exp % 2 == 0) {
    return fastExp(times(base, base), exp / 2);
  } else {
    return times(exp, fastExp(times(base, base), exp / 2));
  }
}
const int MAXN = (int)1e5 + 1;
int N, A[21], B[21], C[21];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    A[i]--;
  }
  for (int i = 0; i < N; i++) {
    cin >> B[i];
  }
  for (int i = 0; i < N - 1; i++) {
    cin >> C[i];
  }
  for (int i = 0; i < N; i++) {
    ans += B[A[i]];
    if (i) {
      ans += C[A[i - 1]];
    }
  }
  cout << ans;
  return 0;
}
