#include <bits/stdc++.h>
using namespace std;
int a[90];
int b[90];
int c[90];
int main() {
  int n;
  cin >> n;
  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; i++) scanf("%d", &c[i]);
  c[n] = 0;
  int ans = 0;
  int add = 0;
  for (int i = 1; i <= n; i++) {
    ans += b[a[i]];
    ans += add;
    add = c[a[i]];
  }
  printf("%d\n", ans);
  return 0;
}
