N=int(input())
l= [list(map(int, input().split())) for i in range(3)]
a=0
for i in range(N-1):
    a+=l[1][l[0][i]-1]
    if l[0][i+1]==l[0][i]+1:
        a+=l[2][l[0][i]-1]
a+=l[1][l[0][N-1]-1]
print(a)