R = lambda: list(map(int, input().split()))

n, k = R()

print((sum(sorted(R())[:n - min(k,n)])))

R = lambda: list(map(int, input().split()))

n, k = R()

print((sum(sorted(R())[:n - k]) if k < n else 0))
R = lambda: list(map(int, input().split()))
n, k = R()
print((sum(sorted(R())[: n - min(k, n)])))

R = lambda: list(map(int, input().split()))
n, k = R()
print((sum(sorted(R())[: n - k]) if k < n else 0))

-print((sum(sorted(R())[: n - min(k, n)]))) +print((sum(sorted(R())[: n - k]) if k < n else 0))