n = int(input())
a = list(map(lambda x: int(x) - 1, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

total = 0
i = -1
for a_i in a:
    if a_i == i + 1:
        total += c[i]
    total += b[a_i]
    i = a_i
print(total)
