n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

manzoku=0;

for i in range(len(a)):
	manzoku+=a[a[i]-1]
	if i+1<n and a[i+1]-a[i]==1:
		manzoku+=a[a[i]-1]
print(manzoku)