#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, sat = 0;
  cin >> n;
  int arr1[n], arr2[n], arr3[n];
  for (i = 0; i < n; i++) {
    cin >> arr1[i];
  }
  for (i = 0; i < n; i++) {
    cin >> arr2[i];
  }
  arr3[0] = 0;
  for (i = 1; i < n; i++) {
    cin >> arr3[i];
  }
  sat = sat + arr2[arr1[0] - 1];
  for (i = 1; i < n; i++) {
    sat = sat + arr2[arr1[i] - 1] + arr3[arr1[i] - 1];
  }
  cout << sat;
}
