local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, string.sub(k, i, i)) end local r = io.read local u = table.unpack return function() return r(u(a)) end end})
local N = read.n()
local A, B, C = {}, {}, {}
for i=1,N do
    A[i] = read.n()
end
for i=1,N do
    B[i] = read.n()
end
for i=1,N-1 do
    C[i] = read.n()
end

local ans = 0
local prev = nil
for i=1,N do
    ans = ans + B[A[i]]
    if prev and A[i] == prev + 1 then
        ans = ans + C[prev]
    end
    prev = A[i]
end
print(ans)