#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,ans=0;cin>>n;
	int a[21],b[21],c[20];
	for(int i=1;i<=n;i++)scanf("%d",&a[i]);
	for(int i=1;i<=n;i++){
	    scanf("%d",&b[i]);
	    ans+=b[i];
	}
	for(int i=1;i<=n-1;i++)scanf("%d",&c[i]);
	for(int i=1;i<=n-1;i++)if(a[i]+1==a[i+1])ans+=c[a[i]];
	cout<<ans<<endl;
    return 0;
}