Option Strict On
Imports System.IO
Module Module1

    Sub Main()
        Dim i, j, n As Integer
        Dim input As StreamReader = New StreamReader("xe4.txt")
        Dim s As String = input.ReadLine
        n = Integer.Parse(s)
        Dim a(n - 1), buf As Double
        For i = 0 To n - 1
            s = input.ReadLine
            a(i) = Double.Parse(s)
        Next i
        For i = 0 To n - 2
            For j = 0 To n - 2
                If a(j) > a(j + 1) Then
                    buf = a(j)
                    a(j) = a(j + 1)
                    a(j + 1) = buf
                End If
            Next j
        Next i
        For i = 0 To n - 1
            Console.WriteLine("{0}", a(i))
        Next i
        Console.WriteLine()
        Console.WriteLine("{0}", n)
        Console.ReadLine()
    End Sub

End Module
