#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, n, l, el, count, index;
  scanf("%lld", &n);
  long long int data[n];
  for (i = 0; i < n; i++) {
    scanf("%lld", &el);
    data[i] = el;
  }
  count = 1;
  index = n - 1 - data[n - 1];
  for (i = n - 1; i >= 0; i--) {
    if (i < index) {
      count = count + 1;
    }
    if (i - data[i] < index) {
      index = i - data[i];
    }
  }
  cout << count << endl;
  return 0;
}
