import qualified Data.List as List

main :: IO()
main = do
    [n, k] <- map read . words <$> getLine :: IO [Int]
    h <- map read . words <$> getLine :: IO [Int]
    let a = List.sortBy (flip compare) h
    print $ sum $ drop k a