import scala.io.StdIn._

object Main extends App {


  val n = readInt()
  val P = readLine().split(" ").map(_.toInt)

  def solve() = {
    val cntAndTmpMin = (0, Long.MaxValue)
    P.foldLeft(cntAndTmpMin) { case ((cnt, tmpMin), num) =>
      if(num <= tmpMin) (cnt+1, num) else (cnt, tmpMin)
    }._1
  }

  println(solve())

}

