#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[30], B[30], C[30];
  int res = 0;
  for (size_t i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (size_t i = 0; i < N; i++) {
    cin >> B[i];
    res += B[i];
  }
  for (size_t i = 0; i < N; i++) {
    cin >> C[i];
  }
  for (size_t i = 0; i < N - 1; i++) {
    if (A[i + 1] - A[i] == 1) {
      res += C[A[i]];
    }
  }
  cout << res << '\n';
}
