#include <iostream>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
int main(){
  int n;cin >> n;
  int ans = 0;
  int a[n], b[n], c[n];
  rep(A, n)cin >> a[A];
  rep(B, n){cin >> b[B];ans+=b[B];}
  rep(C, n)cin >> c[C];
  rep(i, n-1){
    if(a[i] + 1 == a[i+1])ans+=c[a[i]-1];
  }
  cout << ans << endl;
  return 0;
}