#include <bits/stdc++.h>
using namespace std;
int a[25];
int b[25];
int c[25];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) cin >> b[i];
  for (int i = 1; i < n; ++i) cin >> c[i];
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans += b[a[i]];
    for (int j = 1; j < i; ++j) {
      if (a[j] + 1 == a[i]) ans += c[a[j]];
    }
  }
  cout << ans << '\n';
  return 0;
}
