#include <bits/stdc++.h>
using namespace std;
void out() {}
template <typename Head, typename... Tail>
void out(Head H, Tail... T) {
  cout << H << ' ';
  out(T...);
}
void init();
void solve();
int main() {
  init();
  solve();
  return 0;
}
int n;
int L[1000006];
bool killed[1000006] = {false};
void init() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> L[i];
}
void solve() {
  int len = L[n - 1];
  int answer = n;
  for (int i = n - 2; i >= 0; i--) {
    if (len > 0) {
      killed[i] = true;
      answer--;
    }
    len--;
    len = max(len, L[i]);
  }
  out(answer);
}
