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

total = 0;
for i in range(len(a)):
    total += b[a[i] - 1]
    if n - 1 == i: 
        continue
    elif a[i] + 1 == a[i + 1]: 
        print(i)
        total += c[a[i] - 1]

print(total)