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