'use strict'

function Main(input) {

  input = input.trim().split('\n')
  const N = parseInt(input[0])
  const p = input[1].split(' ').map(s => parseInt(s))

  let count = 0
  for(let i = 1; i <= N; ++i) {
    const I = p[i - 1]

    if(I >= 1 && I <= N) {
      let flg = true
      
      for(let j = 1; j <= i; ++j) {
        if (p[j - 1] < I) flg = false
      }
      if(flg) count++
    }

  }

  console.log(count)


}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));