import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
    std.typecons, std.math, std.container, std.format, std.numeric;

void main(string[] args)
{
    long n, k;
    readf("%d %d\n", &n, &k);
    auto hs = readln.strip.split.to!(long[]);
    sort(hs);
    foreach (i; 0 .. min(k, n))
    {
        hs[n - i - 1] = 0;
    }
    writeln(hs.sum);
}
