#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, ans = 1, min;
  cin >> n;
  long long arr[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    arr[i] = i - arr[i];
  }
  min = arr[n];
  for (int i = n - 1; i > 0; i--) {
    if (i < min) {
      ans++;
    }
    if (arr[i] < min) {
      min = arr[i];
    }
  }
  cout << ans;
  return 0;
}
