N=int(input())
A= list(map(int, input().split()))
B= list(map(int, input().split()))
C= list(map(int, input().split()))
ans=0
before=0
for i in range(N):
    eat=A[i]
    ans+=B[eat-1]
    if before+1==eat:
        ans+=C[before-1]
    before=eat
print(ans)