local n=io.read("n")
local a,b,c={},{},{}
for i=1,n do
    a[i]=io.read("n")
end
for i=1,n do
    b[i]=io.read("n")
end
for i=1,n-1 do
    c[i]=io.read("n")
end

local total=0
for i=1,n do
    if i>=2 then
        total=total+b[a[i]]+(a[i-1]+1==a[i] and c[a[i-1]] or 0)
    else
        total=total+b[a[i]]
    end
end
print(total)