def sequence_decomposing(arr)
  min = arr[0]
  ans = 1

  1.upto(arr.size - 1) do |i|
    if arr[i - 1] >= arr[i]
      if min >= arr[i]
        min = [min, arr[i]].min
        ans += 1
      end
    end
  end

  ans
end

n = gets.to_i
arr = []
n.times{ arr << gets.to_i }

puts sequence_decomposing(arr)