#include <bits/stdc++.h>
using namespace std;
int a[1000005];
int INF = 0x3f3f3f3f;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int minn = INF;
    int ans = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = n - 1; i >= 0; i--) {
      if (i < minn) ans++;
      if (i - a[i] < minn) minn = i - a[i];
    }
    printf("%d\n", ans);
  }
  return 0;
}
