import sys
sys.setrecursionlimit(int(1e6))

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

ans = 0
prev = 0
for a in A:
    i = a - 1
    ans += B[i]
    if (prev + 1) == a and (a < N):
        ans += C[i-1]
    prev = a

print(ans)
