#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
using namespace std;
const long long MOD = 1e9 + 7;
const long long MOD1 = 1e9 + 7;
const long long MOD2 = 2000003983;
const long long MOD3 = 1e9 + 9;
const long long p1 = 1e6 + 3;
const long long p2 = 2017;
const long long p3 = 37;
const long long INF = 5e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n;
  cin >> n;
  vector<long long> a(n + 1, 0), b(n + 1, 0), c(n + 1, 0);
  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];
  long long ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans += b[a[i]];
    if (i > 1) ans += c[a[i - 1]];
  }
  cout << ans << "\n";
  return 0;
}
