n = int(input())

A =        list( map(int, input().split()) )	# 1 2 3 4 5 ...
B =        list( map(int, input().split()) )	# 1 2 3 4 5 ...
C =        list( map(int, input().split()) )	# 1 2 3 4 5 ...

ans=0

x=-1
for a in A:
	
	if a==x+1:
		ans+=C[a]
	else:
		ans+=B[a]
	x=a

print(ans)
