N=int(input())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l3=list(map(int,input().split()))
ans=sum(l2)
for i in range(N-1):
  if l1[i+1]==l1[i]+1:
    ans+=l3[l1[i]-1]
print(ans)