N = int(input())
A = input().split()
B = input().split()
C = input().split()
for i in range(len(A)):
    A[i] = int(A[i])
    B[i] = int(B[i])
for i in range(len(C)):
    C[i] = int(C[i])
ans = 0
for i in range(N):
    if A[i - 1] < A[i]:
        ans += B[A[i]] + C[i];
    else:
        ans += B[A[i]];
print(ans)