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]
    let ai_init = init ai
    let ai_tail = tail ai
    print $  (sum [bi!!(x-1) | x <- ai]) + (sum [ci!!((ai_init!!x)-1) | x<-[0..((length ai)-2)], (ai_tail!!x) - (ai_init!!x) == 1])
