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