main =do
    n <- getLine
    ai <- map read . words <$> getLine :: IO [Int]
    bi <- map read . words <$> getLine :: IO [Int]
    ci <- map read . words <$> getLine :: IO [Int]
    print $  (sum [bi!!(x-1) | x <- ai]) + (sum [ci!!(x-1) | x<-(init ai), y<-(tail ai), (y-x) == 1])
