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 x = Array.sum b

(
 [1..(n-1)]
 |>List.sumBy (fun x -> if a.[x-1]+1=a.[x] then c.[a.[x-1]-1] else 0)
)
+ x
|>stdout.WriteLine