main = do
  li <- getLine
  let n = read li
  li <- getLine
  let as = map read $ words li
  li <- getLine
  let bs = map read $ words li
  li <- getLine
  let cs = map read $ words li
  let ans = compute n as bs cs
  print ans

compute :: Int -> [Int] -> [Int] -> [Int] -> Int
compute n as bs cs = (sum bs +) $
  sum $ map ((cs !!).pred.fst) $ filter (\(a,a1) -> succ a == a1) $ zip as (tail as)
