main = do getLine n <- return . sum . map read . words =<< getLine v <- return . read =<< getLine print $ n - v