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

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



h = sorted(h, reverse = True)



s = 0

t = 0

for i in h:

  if t < k:

    t += 1

    continue

  s += i

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

h = sorted(list(map(int, input().split())), reverse=True)



print((sum(h[k:])))
n, k = list(map(int, input().split()))
h = list(map(int, input().split()))
h = sorted(h, reverse=True)
s = 0
t = 0
for i in h:
    if t < k:
        t += 1
        continue
    s += i
print(s)

n, k = list(map(int, input().split()))
h = sorted(list(map(int, input().split())), reverse=True)
print((sum(h[k:])))

-h = list(map(int, input().split())) -h = sorted(h, reverse=True) -s = 0 -t = 0 -for i in h: -    if t < k: -        t += 1 -        continue -    s += i -print(s) +h = sorted(list(map(int, input().split())), reverse=True) +print((sum(h[k:])))