#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n), c(n);
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) cin >> a[i];
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) cin >> b[i];
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) cin >> c[i];
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) a[i]--;
  int ans = 0;
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) {
    ans += b[a[i]];
    if (i != n - 1 && a[i + 1] == a[i] + 1) ans += c[i];
  }
  cout << ans << endl;
  return 0;
}
