main = do
  getLine
  as <- map read . words <$> getLine :: IO [Int]
  bs <- map read . words <$> getLine :: IO [Int]
  cs <- map read . words <$> getLine :: IO [Int]
  print $ eat (-1:as) bs cs

eat :: [Int] -> [Int] -> [Int] -> Int
eat [] _ _ = 0 
eat [_] _ _ = 0
eat (x:y:xs) bs cs 
  | y-x == 1 = bs !! (y-1) + cs !! (x-1) + eat (y:xs) bs cs
  | otherwise = bs !! (y-1) + eat (y:xs) bs cs