N = int(input())
A = [one-1 for one in list(map(int, input().split()))]
B = list(map(int, input().split()))
C = {str(i)+str(i+1):one for i, one in enumerate(list(map(int, input().split())))}

ans = 0
prev = 'aa'
for one in A:
    ans+=B[one]
    prev = prev[1]+str(one)
    if prev in C:
        ans+=C[prev]
    
print(ans)