fun main(args:Array<String>) {
    val n = readLine()!!.toInt()
    val a = readLine()!!.split(" ").map { it.toLong() }
    val arr = mutableListOf<Long>()
    arr.add(a[0])
    (1 until n).forEach {arr.add(Math.max(arr.last(), a[it]))}
    var ans = (0 until n).count { a[it] >= arr[it] }
    println(ans)
}
