let N=stdin.ReadLine() |> int
let A=stdin.ReadLine().Split() |> Array.map int
let B=stdin.ReadLine().Split() |> Array.map int
let C=stdin.ReadLine().Split() |> Array.map int
let rec f i e p=
    if i=N then p
    else
        let E=A.[i]-1
        if E=(e+1) then
            let P=p+B.[E]+C.[e]
            f (i+1) E P
        else
            let P=p+B.[E]
            f (i+1) E P
f 0 -2 0 |> stdout.WriteLine