#include <bits/stdc++.h>
const long long LL_MAX(1LL << 60);
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<vector<long long>> a(51, vector<long long>(51, 0));
  for (long long j = (0); j < (3); j++)
    for (long long i = (0); i < (n); i++) cin >> a[j][i];
  for (long long i = (0); i < (n); i++) a[0][i]--;
  long long sum(0);
  long long prev(a[0][0]);
  for (long long i = (0); i < (n); i++) {
    sum += a[1][a[0][i]];
    if (prev + 1 == i) sum += a[2][a[0][i - 1]];
    prev = i;
  }
  cout << sum << endl;
  return 0;
}
