Module Module1

    Sub Main()

        Dim N As Integer = CInt(Console.ReadLine())
        Dim tmp As String() = Split(Console.ReadLine(), " ")
        Dim P(N) As Integer

        For i As Integer = 1 To N
            P(i) = CInt(tmp(i - 1))
        Next

        Dim c As Integer = 0
        Dim min As Integer = P(1)

        For i As Integer = 1 To N
            Dim flg As Integer = 1
            If min < P(i) Then
                flg = 0
            Else
                min = P(i)
            End If
            c += flg
        Next

        Console.WriteLine(c)

    End Sub

End Module

