object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val seq = Seq.fill(n)(sc.nextInt)
  
  var min = seq.head
  var count = 1

  for (i <- seq) {
    if (i < min) {
      min = i
      count = count + 1
    }
  }
  
  println(count)
}