#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, x[51], y[51], z[51], s = 0;
  cin >> a;
  for (int i = 1; i <= a; i++) {
    cin >> x[i];
  }
  for (int i = 1; i <= a; i++) {
    cin >> y[i];
    s += y[i];
  }
  for (int i = 1; i <= (a - 1); i++) {
    cin >> z[i];
    if ((x[i + 1] - x[i]) == 1) s += z[x[i]];
  }
  cout << s;
  return 0;
}
