[<EntryPoint>]
let main argv =
    let n = System.Console.ReadLine() |> int
    let a = System.Console.ReadLine().Split() |> Array.map int
    let b = System.Console.ReadLine().Split() |> Array.map int
    let c = System.Console.ReadLine().Split() |> Array.map int
    let ans =
        [0 .. n-1] |> List.map (fun i -> b.[i] + if i<>0 && a.[i-1]+1=a.[i] then c.[a.[i-1]-1] else 0) |> List.sum

    printfn "%d" ans
    0