n=int(input())
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]
ans=b[a[0]-1]
for i in range(1,n):
    print("ans: ", ans)
    print("a[i]: ",a[i])
    ans+=b[a[i]-1]
    if a[i-1]+1 == a[i]:
        print("a[i]: ",a[i])
        ans+=c[a[i]-2]
        print("c: ",c[i-1])
print(ans)