let () =
  Scanf.scanf "%d\n" @@ fun n ->
  let arr = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
  let brr = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun b -> b in
  let crr = Array.init (n-1) @@ fun _ -> Scanf.scanf "%d " @@ fun c -> c in
  let ans = ref 0 in
  let bfr = ref arr.(0) in
  for i = 0 to n - 1 do
    ans := !ans + brr.(arr.(i)-1);
    if i <> 0 && arr.(i) - !bfr = 1 then ans := !ans + crr.(!bfr-1);
    bfr := arr.(i)
  done;
  Printf.printf "%d\n" !ans