import java.util.Scanner

fun main(args: Array<String>) {
	val scn = Scanner(System.`in`)
	var m = Int.MAX_VALUE
	var cnt = 0
	val n = scn.nextInt()
	repeat(n){
		val p = scn.nextInt()
		if (p<=m){
			cnt++
			m=p
		}
	}
	print(cnt)
}