#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
int n, a[22], b, ans, c;
bool d[22];
int main(){
	cin>>n;
	rep(i,n){
		cin>>a[i]; a[i]--;
		if(i && a[i-1]+1 == a[i]) d[a[i-1]] = true;
	}
	rep(i,n){
		cin>>b;
		ans += b;
	}
	rep(i,n-1){
		cin>>c;
		if(d[i]) ans += c;
	}
	cout<<ans<<'\n';
}