main = do getLine a <- sum . map (read :: String -> Int) . words <$> getLine n <- readLn :: IO Int print $ a - n