import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

getInts = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine

main :: IO ()
main = do
  [h, k] <- map read . words <$> getLine :: IO [Int]
  h <- drop k . reverse . sort <$> getInts :: IO [Int]

  print $ sum h
