#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 1;
  int range = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (range > 0) {
      range--;
      range = max(range, a[i]);
    } else {
      ans++;
      range = a[i];
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
