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

246b7f628804203377efe31f387e345311a51ad8
<mask token>

<mask token>
h.sort(reverse=True)
<mask token>
for i in range(k, n):
    m += h[i]
print(m)

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