function split(s, c)
  if string.find(s, c) == nil then
    return { s }
  end

  local cs = {}
  
  local lastPos = 0
  for part, p in string.gmatch(s, "(.-)" .. c .. "()") do
    table.insert(cs, part)
    lastPos = p
  end

  table.insert(cs, string.sub(s, lastPos))

  return cs
end

n=io.read("*n")
ans=0
a={}

print("")

for i=0, n-1 do
  table.insert(a, i, io.read("*n")-1)
end

for i=0, n-1 do
  ans = ans + io.read("*n")
end

c={}
for i=0, n-2 do
  table.insert(c, i, io.read("*n"))
end

for i=0, n-2 do
  if a[i]+1 == a[i+1] then
    ans = ans + c[a[i]]
  end
end

print(ans)