from math import ceil

from sys import stdin

n,k = list(map(int,stdin.readline().split()))

h = sorted(list(map(int,stdin.readline().split())))

ans = 0

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

print(ans)
special_moves = input().split(" ")



_, special_moves = int(special_moves [0]), int(special_moves [1])



health= input().split(" ")

health= [int(h) for h in health]

health.sort(reverse=True)

print((sum(health[special_moves:])))
from math import ceil
from sys import stdin

n, k = list(map(int, stdin.readline().split()))
h = sorted(list(map(int, stdin.readline().split())))
ans = 0
for i in range(0, len(h) - k):
    ans += h[i]
print(ans)

special_moves = input().split(" ")
_, special_moves = int(special_moves[0]), int(special_moves[1])
health = input().split(" ")
health = [int(h) for h in health]
health.sort(reverse=True)
print((sum(health[special_moves:])))

-from math import ceil -from sys import stdin - -n, k = list(map(int, stdin.readline().split())) -h = sorted(list(map(int, stdin.readline().split()))) -ans = 0 -for i in range(0, len(h) - k): -    ans += h[i] -print(ans) +special_moves = input().split(" ") +_, special_moves = int(special_moves[0]), int(special_moves[1]) +health = input().split(" ") +health = [int(h) for h in health] +health.sort(reverse=True) +print((sum(health[special_moves:])))