n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

sum = 0
for i in range(N):
    sum += b[a[i]]
    if((i < N-1) and (a[i+1] == (a[i] + 1))):
        sum += c[a[i]]

print(sum)
