#include <bits/stdc++.h>
using namespace std;
using ll = long long;
enum {};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int c = a[n - 1], cnt = 1;
  for (int i = n - 2; i >= 0; --i) {
    if (c <= 0) {
      ++cnt;
    }
    --c;
    c = max(c, a[i]);
  }
  cout << cnt << '\n';
  return 0;
}
