Module _20190423

    Sub Main()

        Dim iCount As Integer = Console.ReadLine()

        Dim sValue() As Integer

        For i As Integer = 0 To iCount - 1

            ReDim Preserve sValue(i)

            sValue(i) = Console.ReadLine()

        Next

        '値段の降順に並び替えるバブルソート
        For j As Integer = 0 To iCount - 1

            For k As Integer = iCount - 1 To j + 1 Step -1

                If CInt(sValue(k)) > CInt(sValue(k - 1)) Then

                    Dim iTemp As Integer = sValue(k)
                    sValue(k) = sValue(k - 1)
                    sValue(k - 1) = iTemp

                End If

            Next

        Next

        Dim iOtherTotal As Integer
        For l As Integer = 1 To iCount - 1

            iOtherTotal = iOtherTotal + sValue(l)

        Next

        Console.WriteLine(CInt(sValue(0) / 2) + iOtherTotal)

    End Sub

End Module
