#include <bits/stdc++.h>
using namespace std;
int e[30];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n + 1], b[n + 1], c[n];
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i < n; i++) cin >> c[i];
  int s = 0;
  for (int i = 1; i <= n; i++) {
    s += b[a[i]] + e[a[i]];
    if (a[i] <= n - 1) e[a[i] + 1] = c[a[i]];
  }
  cout << s << endl;
  return 0;
}
