import scala.annotation.tailrec

object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val p = Array.fill(n)(sc.nextInt())
  println(calc(p, 0, p(0), 0))
  
  @tailrec
  def calc(p: Array[Int], i: Int, max: Int, acc: Int): Int = {
    if (p.length == i) {
      acc
    } else if (p(i) <= max) {
      calc(p, i+1, p(i), acc+1)
    } else {
      calc(p, i+1, max, acc)
    }
  }
}