var stdin = require("fs").readFileSync("/dev/stdin", "utf8");
stdin = stdin.trim().split("\n").reverse();
function input(){return stdin.pop()};
var stdout = [];
function print(x){stdout.push(x)};


var n = parseInt(input());
var h = input().split(" ").map(n=>parseInt(n));


var maxh = h[0];
var ans = 1
for (i=1; i < n; i++){
    if (h[i] > maxh-1){
        ans++;
        maxh = h[i]
    }
}

print(ans);


stdout = stdout.join("\n");
console.log(stdout);