"use strict";
function Main(input) {
    let lines = input.split("\n");
    let N = lines.shift().split(/\s/).map((v) => v - 0)[0];
    let H = lines.shift().split(/\s/).map((v) => v - 0);
    let ans = 1;
    for (let n = 1; n < N; n++) {
        if (H[n-1] <= H[n]) ans++;
        else break;
    }
    console.log(ans);
}
if (typeof window == "undefined") Main(require("fs").readFileSync("/dev/stdin", "utf8"));