#include <bits/stdc++.h>
int main() {
  int n, prev_dish, score = 0;
  scanf("%d", &n);
  int a[21], b[21], c[21];
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= n - 1; i++) scanf("%d", &c[i]);
  score += b[a[1]];
  prev_dish = a[1];
  for (int i = 2; i <= n; i++) {
    score += b[a[i]];
    if (prev_dish == i - 1) score += c[i - 1];
  }
  printf("%d", score);
}
