#include <bits/stdc++.h>
int a[1000], b[1000], c[1000] = {0};
int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
  int n;
  scanf("%d", &n);
  int i;
  int count = 0;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (i = 1; i < n; i++) scanf("%d", &c[i]);
  qsort(c + 1, n - 1, sizeof(c[1]), cmp);
  int index = 1;
  for (i = 1; i <= n; i++) {
    if (a[i] < a[i + 1] && index < n) {
      count += c[index];
      index++;
    }
    count += b[a[i]];
  }
  printf("%d", count);
  return 0;
}
