n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

counter=0
for i in range(n-1):
  if A[i]==A[i+1]-1:
    counter+=C[A[i]-1]
print(counter+sum(B))