import Control.Monad
import Data.List

readInts :: IO [Int]
readInts = map read . words <$> getLine

main :: IO ()
main = do
  [_, k] <- readInts
  hs <- readInts
  print $ solve k hs

solve :: Int -> [Int] -> Int
solve k = sum . drop k . sortBy (flip compare)
