#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long tam, dem = 1, vt = 0, n, b[1000005];
  cin >> n;
  vt = n - 1;
  for (long i = 0; i < n; i++) cin >> b[i];
  for (long i = n - 1; i >= 0; i--) {
    if (vt > i) {
      dem++;
      vt = i - b[i];
    } else if (vt > i - b[i]) {
      vt = i - b[i];
    }
  }
  cout << dem;
  return 0;
}
