      PROGRAM lowElements
      IMPLICIT NONE
      integer(16) :: n,ans
      integer(16),allocatable :: p(:)
      integer(16) :: mi,i
      
      read*,n
      allocate(p(n))
      read*,p(:)
      
      ans = 0
      mi = p(1)
      do i = 1,n
        if( mi>=p(i) )then
          mi = p(i)
          ans = ans + 1
        end if
      end do
      
      print*,ans
      
      
      
      
      
      END PROGRAM