#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long mini = n - arr[n - 1];
  long long count = 1;
  for (long long i = n - 2; i >= 0; i--) {
    if (i + 1 < mini) count++;
    mini = min(mini, i + 1 - arr[i]);
  }
  cout << count << endl;
}
