#include <bits/stdc++.h>
using namespace std;
int a[22], b[22], c[22];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 2; i <= n; i++) cin >> c[i];
  long long sum = b[a[1]];
  for (int i = 2; i <= n; i++) {
    sum += b[a[i]] + c[a[i]];
  }
  cout << sum;
}
