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

h = [int(i) for i in input().split()]

h.sort()

count = 0

if k >= n:

    print((0))

else:

    print((sum(h[0:n - k])))
n, k = list(map(int, input().split()))

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

print((sum(sorted(h)[:max(0, n - k)])))
n, k = list(map(int, input().split()))
h = [int(i) for i in input().split()]
h.sort()
count = 0
if k >= n:
    print((0))
else:
    print((sum(h[0 : n - k])))

n, k = list(map(int, input().split()))
h = list(map(int, input().split()))
print((sum(sorted(h)[: max(0, n - k)])))

-h = [int(i) for i in input().split()] -h.sort() -count = 0 -if k >= n: -    print((0)) -else: -    print((sum(h[0 : n - k]))) +h = list(map(int, input().split())) +print((sum(sorted(h)[: max(0, n - k)])))