n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
s = 0
for x in B:
    s += x
for i in range(n-1):
    if A[i+1]-A[i]==1:
        s += C[A[i]]
print(s)