Hands that shed innocent blood!

There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings and every person kills some of people in front of him. All people kill others at the same time. Namely, the i-th person kills the j-th person if and only if j < i and j ≥ i - Li.

You are given lengths of the claws. You need to find the total number of alive people after the bell rings.

Input

The first line contains one integer n (1 ≤ n ≤ 106) — the number of guilty people.

Second line contains n space-separated integers L1, L2, ..., Ln (0 ≤ Li ≤ 109), where Li is the length of the i-th person's claw.

Output

Print one integer — the total number of alive people after the bell rings.

Examples

Input

4
0 1 0 10


Output

1


Input

2
0 0


Output

2


Input

10
1 1 3 0 0 0 2 1 0 3


Output

3

Note

In first sample the last person kills everyone in front of him.
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
import java.lang.Math;
import java.math.BigInteger;

public class Problem {
	long INF = Long.MAX_VALUE - 12345;

	class Laptop implements Comparable<Laptop> {
		String name;
		int cost;

		Laptop(String name, int cost) {
			this.name = name;
			this.cost = cost;
		}

		public int compareTo(Laptop other) {
			return Integer.compare(this.cost, other.cost);
		}

	}

	Set<Integer>[] st;
	boolean[] used = new boolean[26];
	
	class Pair{
		long value;
		int ind;
		Pair(long value, int ind){
			this.value = value;
			this.ind = ind;
		}
	}
	
	class Segment{
		long sum;
		int l;
		int r;
		Segment(long sum, int l, int r){
			this.r = r;
			this.l = l;
			this.sum = sum;
		}
	}
	class Bank{
		long v;
		long z;
		Bank(long v, long z){
			this.v = v;
			this.z = z;
		}
	}
	void solve() throws IOException {
		int n = rI();
		long maxR = -1;
		int ans = 0;
		int[] a = rA(n);
		
		for(int i=0;i<n/2;++i){
			int v = a[i];
			a[i] = a[n-1-i];
			a[n-1-i] = v;
		}

		for(int i=0;i<n;++i){
			int l = a[i];
			if(i>maxR){
				ans++;
			}
			if(i+l>maxR){
				maxR = i+l;
			}
		}
		out.println(ans);
	}

	class SegmentTree {
		long[] t;

		SegmentTree(long[] a, int n) {
			t = new long[n * 4];
			build(a, 1, 1, n);
		}

		void build(long[] a, int v, int tl, int tr) {
			if (tl == tr) {
				t[v] = a[tl];
				return;
			}
			int tm = (tr + tl) / 2;
			build(a, 2 * v, tl, tm);
			build(a, 2 * v + 1, tm + 1, tr);
			t[v] = Math.max(t[2 * v], t[2 * v + 1]);
		}

		void update(int v, int tl, int tr, int pos, long value) {
			if (tl == tr) {
				t[v] = value;
				return;
			}
			int tm = (tl + tr) / 2;
			if (pos <= tm) {
				update(2 * v, tl, tm, pos, value);
			} else {
				update(2 * v + 1, tm + 1, tr, pos, value);
			}
			t[v] = Math.max(t[2 * v], t[2 * v + 1]);
		}

		long getMax(int v, int tl, int tr, int l, int r) {
			if (l > r) {
				return -INF;
			}
			if (tl == l && tr == r) {
				return t[v];
			}
			int tm = (tr + tl) / 2;
			long max1 = getMax(2 * v, tl, tm, l, Math.min(r, tm));
			long max2 = getMax(2 * v + 1, tm + 1, tr, Math.max(l, tm + 1), r);
			return Math.max(max1, max2);
		}
	}

	int checkBit(int mask, int bit) {
		return (mask >> bit) & 1;
	}

	public static void main(String[] args) throws IOException {

		new Problem().run();
	}

	boolean isLower(char a) {
		return ((int) a) >= 97 ? true : false;
	}

	int[][] STEPS = { { 0, 1 }, { 1, 0 }, { -1, 0 }, { 0, -1 } };

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	Random rnd = new Random();
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	Problem() throws FileNotFoundException {

		try {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		} catch (Exception e) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}

		tok = new StringTokenizer("");
	}

	long checkBit(long mask, int bit) {
		return (mask >> bit) & 1;
	}

	// ======================================================

	// ======================================================
	void run() throws IOException {
		solve();
		out.close();
	}

	char[] reverseCharArray(char[] arr) {
		char[] ans = new char[arr.length];
		for (int i = 0; i < arr.length; ++i) {
			ans[i] = arr[arr.length - i - 1];
		}
		return ans;
	}

	int sqrt(double m) {
		int l = 0;
		int r = 1000000000 + 9;
		int i = 1000;
		while (r - l > 1) {
			int mid = (r + l) / 2;
			if (mid * mid > m) {
				r = mid;
			} else {
				l = mid;
			}
		}
		return l;
	}

	int countPow(int m, int n) {
		int ans = 0;
		while (m % n == 0 && m > 0) {
			ans++;
			m /= n;
		}
		return ans;
	}

	long binPow(long a, long b) {
		if (b == 0) {
			return 1;
		}
		if (b % 2 == 1) {
			return a * binPow(a, b - 1);
		} else {
			long c = binPow(a, b / 2);
			return c * c;
		}

	}

	int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	long pow(long x, long k) {
		long ans = 1;
		for (int i = 0; i < k; ++i) {
			ans *= x;
		}
		return ans;
	}

	class Fenwik {

	}

	// ////////////////////////////////////////////////////////////////////

	String delimiter = " ";

	String readLine() throws IOException {
		return in.readLine();
	}

	String rS() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine)
				return null;

			tok = new StringTokenizer(nextLine);
		}

		return tok.nextToken(delimiter);
	}

	int rI() throws IOException {
		return Integer.parseInt(rS());
	}

	long rL() throws IOException {
		return Long.parseLong(rS());
	}

	double rD() throws IOException {
		return Double.parseDouble(rS());
	}

	int[] rA(int b) {
		int a[] = new int[b];
		for (int i = 0; i < b; i++) {
			try {
				a[i] = rI();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return a;
	}

	int[] readSortedIntArray(int size) throws IOException {
		Integer[] array = new Integer[size];

		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}

	int[] sortedIntArray(int size, int[] array) throws IOException {
		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}
}