#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ans = 0;
  int before = n + 1;
  vector<int> a(n), b(n), c(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  for (int i = 0; i < n; i++) cin >> b.at(i);
  for (int i = 0; i < n; i++) cin >> c.at(i);
  for (int i = 0; i < n; i++) {
    ans += b.at(a.at(i));
    if (a.at(i) - 1 == before) ans += c.at(i);
    before = a.at(i);
  }
  cout << ans << endl;
  return 0;
}
