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

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



h.sort(reverse=True)



ans = 0

for i in range(k, n):

  ans += h[i]

  

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

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



h.sort(reverse=True)

  

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

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

-ans = 0 -for i in range(k, n): -    ans += h[i] -print(ans) +print((sum(h[k:])))