#include <bits/stdc++.h>
using namespace std;
long long gcd(long long, long long);
vector<bool> to_binary(int);
int sum(vector<int>);
int min(vector<int>);
int max(vector<int>);
long long nCr(long long n, long long r);
const long long INF = 1LL << 60;
bool mycomp(tuple<long long, long long> x, tuple<long long, long long> y) {
  return get<1>(x) < get<1>(y);
}
vector<vector<long long>> memo;
long long get(int x, int y) {
  if (memo[x][y] != -1) return memo[x][y];
  if (x == 0) return 1;
  if (y < x) return 0;
  memo[x][y] = get(x, y - 1) + get(x - 1, y - 1);
  return memo[x][y];
}
long long mpow(long long a, long long b) {
  long long ans = 1;
  for (long long i = 0; i < b; i++) {
    ans *= a;
    ans %= 1000000007;
  }
  return ans;
}
long long nCr(long long n, long long r) {
  long long res = 1;
  for (int i = 0; i < r; i++) {
    res *= (n - i);
  }
  for (int i = 1; i <= r; i++) {
    res /= i;
  }
  return res;
}
int vsum(vector<int> v) {
  int res = 0;
  for (auto it = v.begin(); it != v.end(); it++) res += *it;
  return res;
}
int vmin(vector<int> v) {
  int min = INT32_MAX;
  for (auto it = v.begin(); it != v.end(); it++) min = std::min(min, *it);
  return min;
}
int vmax(vector<int> v) {
  int max = INT32_MIN;
  for (auto it = v.begin(); it != v.end(); it++) max = std::max(max, *it);
  return max;
}
long long gcd(long long A, long long B) {
  if (A == 0 || B == 0) return max(A, B);
  int r = A % B;
  while (r != 0) {
    A = B;
    B = r;
    r = A % B;
  }
  return B;
}
vector<bool> to_binary(int x) {
  vector<bool> res;
  while (x != 0) {
    res.push_back(x % 2);
    x /= 2;
  }
  return res;
}
template <int index>
bool comp(tuple<long long, long long, long long, long long> a,
          tuple<long long, long long, long long, long long> b) {
  return get<index>(a) < get<index>(b);
}
int vector_finder(std::vector<long long> vec, long long number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = std::distance(vec.begin(), itr);
  if (index != vec.size()) {
    return index;
  } else {
    return 0;
  }
}
int len(int x) { return (int)log10(x) + 1; }
int same_vec(vector<int> a, vector<int> b) {
  int res = 1, num = a.size();
  for (int i = 0; i < num; i++) {
    if (a[i] != b[i]) {
      res = 0;
      break;
    }
  }
  return res;
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> B(N);
  vector<int> C(N);
  long long ans = 0;
  long long tmp;
  for (long long i = 0; i < (long long)N; i++) cin >> A[i];
  for (long long i = 0; i < (long long)N; i++) {
    cin >> tmp;
    ans += tmp;
  }
  for (long long i = 0; i < (long long)N - 1; i++) cin >> C[i];
  cout << ans << endl;
  for (int i = 0; i < N - 1; i++) {
    if (A[i] + 1 == A[i + 1]) ans += C[A[i] - 1];
  }
  cout << ans << endl;
ProgramEndPointLabel:;
  system("pause");
  return 0;
}
