#include <bits/stdc++.h>
using namespace std;
int a[11000000];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int add = 1;
  int t = n;
  for (int i = n; i >= 1; i--) {
    if (i < t) add++;
    t = min(t, i - a[i]);
  }
  cout << add << endl;
  return 0;
}
