object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val p1 :: ps = List.fill(sc.nextInt())(sc.nextInt())
  val (_, count) = ps.foldLeft(p1 -> 1) {
    case ((min, count), p) =>
      if (p <= min) (p, count + 1) else (min, count)
  }
  println(count)
}
