#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, i, j, k = 0, l;
  cin >> n;
  int a[n + 1], b[n + 1];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = i;
  }
  for (i = 1; i <= n; i++) {
    l = i - a[i];
    if (l < 1) l = 1;
    b[l] = i;
  }
  l = 1;
  for (i = n; i >= 1; i--) {
    if (b[i] > i) {
      l = b[i];
      j = i;
      while (l >= b[i] && i <= n) {
        b[i] = l;
        i++;
      }
      i = j;
    }
  }
  j = 0;
  for (i = n; i >= 1; i--) {
    if (b[i] == i) {
      j++;
    }
  }
  cout << j << endl;
  return 0;
}
