open System

let N = Console.ReadLine() |> int
let A = Console.ReadLine().Split() |> Array.map int
let B = Console.ReadLine().Split() |> Array.map int
let C = Console.ReadLine().Split() |> Array.map int

let saticfuction i = B.[A.[i]-1] + if (i>0 && A.[i-1] + 1 = A.[i]) then C.[A.[i-1]-1] else 0

[0 .. N-1] |> List.map (fun i -> saticfuction(i))
           |> List.sum
           |> Console.WriteLine
           |> ignore
