#include <bits/stdc++.h>
using namespace std;
template <typename tn>
void read(tn &a) {
  tn x = 0, f = 1;
  char c = ' ';
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  a = x * f;
}
long long n;
long long a[25], b[25], c[25];
bool v[25];
long long ans;
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(a[i]);
  for (int i = 1; i <= n; i++) read(b[i]);
  for (int i = 2; i <= n; i++) read(c[i]);
  for (int i = 1; i <= n; i++) {
    v[a[i]] = 1;
    ans += b[a[i]];
    if (v[a[i] - 1]) ans += c[a[i]];
  }
  printf("%lld\n", ans);
  return 0;
}
