[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let n = read int
    let ps = reada int
    let qs = reada int
    let rs = reada int

    let mutable ans = 0
    let mutable last = -2
    for i in ps do
        let a = qs.[i-1]
        let b = if i = last + 1 && i - 2 >= 0 then rs.[i-2] else 0
        ans <- ans + a + b
        last <- i

    printfn "%i" ans
    0