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