import scala.collection.mutable.ArrayBuffer

object Main extends App {
	val sc = new java.util.Scanner(System.in)
	val pw = new java.io.PrintWriter(System.out)
	
	val n = sc.nextInt
	val p = Seq.fill(n)(sc.nextInt)
	
	var min = p(0)
	
	pw.println( p.foldLeft(1)((z, pi) => z + (if (pi < min) {min = pi; 1} else 0)) )
	pw.flush()
}