N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
r = 0
a = 0
for i in range(N):
    r += B[A[i]-1]
    if  A[i] > len(C):
        continue
    elif A[i] == a+1 :
        r += C[a-1]
    a = A[i]
print(r)