import Control.Monad
import Data.Maybe
import Data.List
import Data.Ord
import qualified Data.ByteString.Char8 as BS

main = do
  [n, k] <- getIntList
  h <- getIntList
  print $ sum $ drop (fromIntegral k) (sortOn Down h)

readInt = fst . fromJust . BS.readInteger
readIntList = map readInt . BS.words
getIntList = readIntList <$> BS.getLine
