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

a.append(23)

count = 0

for i in range(n):
    count += b[a[i]-1]
    #print("added"+str(b[a[i]-1]))
    if ((a[i]+1)==a[i+1]):
        #print("yeah"+str(c[i]))
        count += c[i+1]
print(count)


