N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

bounas = 0

B_Sum = sum(B)

for x in A:
    if x == x+1:
        bounas += C[x-1]
        
print((bounas) + (B_Sum) )