#include<bits/stdc++.h>
using namespace std;
#define ll long long
signed main(){
	ll n, i, sum=0;
	cin>>n;
	ll a[10000], b[10000], c[10000];
	for(i=1; i<=n; i++){
		cin>>a[i];
	}
	for(i=1;i<=n; i++){
		cin>>b[i];
		sum += b[i];
	}
	for(i=1; i<=n-1; i++){
		cin>>c[i];
	}
	for(i=1; i<n; i++){
		if(a[i+1]-a[i]==1){
			sum += c[a[i]];
		}
	}
	cout<<sum;
}