n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
s=0
for i in range(n):
    s+=b[i]
    if i<=n-2 and a[i+1]==a[i]+1:
        s+=c[a[i]-1]
print(s)