#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> flow(n);
  for (int i = 0; i < n; i++) {
    cin >> flow.at(i);
  }
  int b = 0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> b;
    sum += b;
  }
  vector<int> omake(n - 1);
  for (int i = 0; i < n; i++) {
    cin >> omake.at(i);
    if (flow.at(i) + 1 == flow.at(i + 1)) sum += omake.at(flow.at(i));
  }
  cout << sum << endl;
}
