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

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



h = sorted(h)[::-1]



ans = 0

for i in range(k, n):

	ans += h[i]



print(ans)
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 = [int(i) for i in input().split()]
h = sorted(h)[::-1]
ans = 0
for i in range(k, n):
    ans += h[i]
print(ans)

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

-h = [int(i) for i in input().split()] -h = sorted(h)[::-1] -ans = 0 -for i in range(k, n): -    ans += h[i] -print(ans) +h = sorted(list(map(int, input().split())), reverse=True) +print((sum(h[k:])))