n=int(input())
a=input().split()
b=input().split()
c=input().split()
to=0

for i in range(n):
    to+=int(b[int(a[i])-1])
    if i!=0 and int(a[i])-int(a[i-1])==1:
        to+=int(c[int(a[i-1])-1])
print(to)
