let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.map f
let n = read int
let as' = reads int
let bs' = reads int
let cs' = reads int

let mutable acc = 0
for i = 0 to (n-1) do
    acc <- acc + bs'.[as'.[i]-1]
    if i <> (n-1) && as'.[i+1]-as'.[i] = 1 then
        acc <- acc + cs'.[as'.[i]-1]
printfn "%d" acc