local function read_a(n,m)m=m or 1 r={}for i=1,m do r[i]={}end for i=1,n do for j=1,m do r[j][i]=io.read"*n"end end return unpack(r)end

N=io.read"*n"
A=read_a(N)

s=0
m=math.huge
for i=1,N do
	if(m>A[i])then s=s+1 m=A[i]end
end
print(s)