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