#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0;
  cin >> n;
  vector<int> a(n), b(n), c(n - 1);
  a[n] = {0};
  b[n] = {0};
  c[n] = {0};
  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; ++i) cin >> c[i];
  for (int i = 0; i < n; ++i) {
    ans += b[a[i] - 1];
    if (a[i] + 1 == a[i + 1] && a[i + 1] != 0) {
      ans += c[a[i] - 1];
    }
  }
  cout << ans << endl;
  return 0;
}
