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

for i in a:
    i-=1
    ans += b[i]
    if i == tem + 1:
        ans += c[tem]
        tem = i
print(ans)