#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, bonus[20], sum = 0, num = 0, back = 100;
  cin >> n;
  for (int i = 0; i < 3; i++) {
    if (i == 2) n--;
    for (int j = 0; j < n; j++) {
      int num = 0;
      cin >> num;
      if (i == 0) {
        bonus[j] = 0;
        if (num == back + 1) {
          bonus[back - 1] = 1;
        }
        back = num;
      } else if (i == 1) {
        sum += num;
      } else if (i == 2) {
        if (bonus[j] == 1) {
          sum += num;
        }
      }
    }
  }
  cout << sum << endl;
  return 0;
}
