#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long a, long long b) {
  return b == 0 ? a : gcd(b, a % b);
}
inline long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  long long leastTouchedPersonFromRight = n + 1, ans = 0;
  vector<long long> L(n + 1);
  for (int(i) = (1); (i) <= (n); (i)++) cin >> L[i];
  for (int i = n; i >= 1; i--) {
    ans += (i < leastTouchedPersonFromRight);
    leastTouchedPersonFromRight = min(leastTouchedPersonFromRight, i - L[i]);
  }
  cout << ans << '\n';
  return 0;
}
