Imports System                      ' for System.Console.WriteLine
Imports System.Collections.Generic  ' for List

Module Module1

    Sub Main()

        Dim tmp As String() = Split(Console.ReadLine(), " ")
        Dim N As Integer = CInt(tmp(0))
        Dim K As Integer = CInt(tmp(1))
        Dim tmp2 As String() = Split(Console.ReadLine(), " ")
        Dim monster As New List(Of Integer)

        For i As Integer = 0 To N - 1
            monster.Add(CInt(tmp2(i)))
        Next

        monster.Sort()

        Dim cnt As Long = 0

        For Each m As Integer In monster
            If N - K > 0 Then
                cnt += m
            End If
            N -= 1
        Next

        Console.WriteLine(cnt)

    End Sub

End Module
