fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val list = readLine()!!.split(" ").map(String::toInt)

    var count = 1
    for (i in 1..(n - 1)) {
        if (list[0] < list[i] && list[i] > list[i - 1]) {
            count++
        }
    }
    println(count)
}
