import itertools

import math

import fractions

import functools

n, k = list(map(int, input().split()))

h = list(map(int, input().split()))



h.sort(reverse=True)

if k < n:

    for i in range(k):

        h[i] = 0

else:

    h = [0] * len(h)

print((sum(h)))

n, k = list(map(int, input().split()))

h = list(map(int, input().split()))



h.sort(reverse=True)



if n >= k:

    for i in range(k):

        h[i] = 0

    print((sum(h)))

else: print((0))
import itertools
import math
import fractions
import functools

n, k = list(map(int, input().split()))
h = list(map(int, input().split()))
h.sort(reverse=True)
if k < n:
    for i in range(k):
        h[i] = 0
else:
    h = [0] * len(h)
print((sum(h)))

n, k = list(map(int, input().split()))
h = list(map(int, input().split()))
h.sort(reverse=True)
if n >= k:
    for i in range(k):
        h[i] = 0
    print((sum(h)))
else:
    print((0))

-import itertools -import math -import fractions -import functools - -if k < n: +if n >= k: +    print((sum(h))) -    h = [0] * len(h) -print((sum(h))) +    print((0))