#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, count = 1, minn;
  cin >> n;
  vector<int> l(n + 1);
  for (int i = 1; i <= n; i++) cin >> l[i];
  vector<int> a(n + 1);
  a[n] = n - l[n];
  minn = a[n];
  for (int i = n - 1; i > 0; i--) {
    if (i < minn) count++;
    minn = min(minn, i - l[i]);
  }
  cout << count;
}
