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