program ABC152C
    implicit none
    integer(8)::N,p_min,i
    integer(8)::result=1
    integer(8),allocatable,dimension(:)::P
    read(5,*)N
    allocate(P(N))
    read(5,*)(P(i),i=1,N)

    p_min=P(1)

    do i=2,N
        if(P(i)<=p_min)then
            p_min=P(i)
            result=result+1
        end if
    end do

    print'(i0)',result
end program ABC152C