#include <bits/stdc++.h>
using namespace std;
int arr[1000006];
int main() {
  int n;
  cin >> n;
  for (int i = n - 1; i > -1; i--) scanf("%d", &arr[i]);
  int last = 0, ans = 1;
  for (int i = 0; i < n; i++) {
    if (last < i) ans++;
    last = max(last, i + arr[i]);
  }
  cout << ans;
}
