#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> L(n);
  for (int i = 0; i < n; i++) cin >> L[i];
  reverse(L.begin(), L.end());
  int lastKill = -1;
  int live = 0;
  for (int i = 0; i < n; i++) {
    if (lastKill < i) live++;
    lastKill = max(lastKill, i + L[i]);
  }
  cout << live << "\n";
  return 0;
}
