#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[50], b[50], c[50], n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> c[i];
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += b[a[i]];
    if (a[i + 1] - a[i] == 1) sum += c[a[i]];
  }
  cout << sum << endl;
  return 0;
}
