N, K = list(map(int, input().split()))

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

if N <= K:

    print((0))

else:

    H.sort(reverse=True)

    print((sum(H[K:])))
N, K = list(map(int, input().split()))

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

ans = sum(H[K:])

print(ans)
N, K = list(map(int, input().split()))
H = list(map(int, input().split()))
if N <= K:
    print((0))
else:
    H.sort(reverse=True)
    print((sum(H[K:])))

N, K = list(map(int, input().split()))
H = sorted(map(int, input().split()), reverse=True)
ans = sum(H[K:])
print(ans)

-H = list(map(int, input().split())) -if N <= K: -    print((0)) -else: -    H.sort(reverse=True) -    print((sum(H[K:]))) +H = sorted(map(int, input().split()), reverse=True) +ans = sum(H[K:]) +print(ans)