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

for i in range(N):
    point += B[A[i] - 1]
    if A[i] == mae + 1:
        point+=C[mae - 1]
    mae = A[i]
print(point)