program ABC152C
    implicit none
    integer::N
    integer,allocatable,dimension(:)::P
    integer::MIN,ANS=0
    integer::i
    read*,N
    allocate(P(N))
    read*,P
    MIN=P(1)
    do i=1,N
        if(MIN>=P(i))then
            MIN=P(i)
            ANS=ANS+1
        endif
    end do
    print"(i0)",ANS
end program ABC152C