#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, a, b, c, x, y, z, i, j, k;
  scanf("%lld", &n);
  long long int len[n + 1];
  for (i = 1; i <= n; i++) {
    scanf("%lld", &len[i]);
  }
  t = 1;
  long long int lowest = n - len[n];
  for (i = n - 1; i >= 1; i--) {
    if (i < lowest) {
      t++;
    }
    if (lowest > (i - len[i])) {
      lowest = i - len[i];
    }
  }
  printf("%lld\n", t);
  return 0;
}
