#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  std::cin >> n;
  std::vector<int> a(n), b(n), c(n - 1);
  for (int i = 0; i < (n); ++i) std::cin >> a[i];
  for (int i = 0; i < (n); ++i) std::cin >> b[i];
  for (int i = 0; i < (n); ++i) std::cin >> c[i];
  int cnt = b[a[0] - 1];
  for (int i = 1; i < n; ++i) {
    cnt += b[a[0] - 1];
    if (a[i - 1] == a[i] - 1) {
      cnt += c[a[i - 1] - 1];
    }
  }
  std::cout << cnt << "\n";
  return 0;
}
