#include <bits/stdc++.h>
const int N = 3e5 + 5, MAX = 3e7, MOD = 1e9 + 7;
using namespace std;
int n;
bool ate[60];
int main() {
  cin >> n;
  std::vector<int> a(n), b(n), c(n);
  for (int i = 0; i < n; i++) cin >> a[i], a[i]--;
  for (int i = 0; i < n; i++) cin >> b[i];
  for (int i = 1; i < n; i++) cin >> c[i];
  int ans = 0;
  for (int i = 0; i < n; i++) {
    ans += b[a[i]];
    if (ate[a[i] - 1]) ans += c[a[i]];
    ate[a[i]] = 1;
  }
  cout << ans << endl;
}
