N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
pt = 0
for i in range(N):
    pt += B[A[i]-1]
    if i > 1 and (A[i]-1) == A[i-1]:
        pt += C[i-2]
print(str(pt))