#include <bits/stdc++.h>
const int maxn = 51;
inline int read() {
  register int x = 0, ch = getchar(), f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
int n;
int a[maxn], b[maxn], c[maxn];
bool vis[maxn];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++) b[i] = read();
  for (int i = 2; i <= n; i++) c[i] = read();
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += b[a[i]];
    vis[a[i]] = 1;
    if (vis[a[i] - 1]) ans += c[a[i]];
  }
  printf("%d", ans);
}
