import math

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

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

als.sort(reverse=1)

ans = 0

for i in range(k,n):

    ans += als[i]

print(ans)



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

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

a.sort(reverse=1)

print((sum(a[k:])))

import math

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

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

-import math - -als = list(map(int, input().split())) -als.sort(reverse=1) -ans = 0 -for i in range(k, n): -    ans += als[i] -print(ans) +a = list(map(int, input().split())) +a.sort(reverse=1) +print((sum(a[k:])))