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.math.*;
public class Soln{
	static Node build(int n){
		int l=(int)Math.pow(2,Math.ceil(Math.log(n)/Math.log(2)));
		Node children[]=new Node[l];
		for(int i=0;i<n;i++){
			children[i]=new Node();
			children[i].from=children[i].to=i;
			children[i].count=1;
			children[i].left=children[i].right=null;
		}
		for(int i=n;i<l;i++){
			children[i]=new Node();
			children[i].from=children[i].to=i;
			children[i].count=0;
			children[i].left=children[i].right=null;
		}
		l>>=1;
		Node parent[];
		while(l>0){
			parent=new Node[l];
			for(int i=0;i<l;i++){
				parent[i]=new Node();
				parent[i].left=children[2*i];
				parent[i].right=children[2*i+1];
				parent[i].from=parent[i].left.from;
				parent[i].to=parent[i].right.to;
				parent[i].count=parent[i].left.count + parent[i].right.count;
			}
			children=parent;
			l>>=1;
		}
		return children[0];
	}
	static void update(Node root,int l,int r){
		if(r<l)
			return;
		if(root==null)
			return;
		if(root.count==0)
			return;
		if(root.from>=l && root.to <= r){
			root.count=0;
			return;
		}
		if(root.left!=null && root.left.from <= r && root.left.to >= l)
			update(root.left,l,r);
		if(root.right!=null && root.right.from <=r && root.right.to >= l)
			update(root.right,l,r);
		if(root.left!=null && root.right!=null)
			root.count = root.left.count + root.right.count;
	}
	public static void main(String args[])throws Exception{
		int n=nextInt();
		Node root=build(n);
		for(int i=0;i<n;i++){
			int l=nextInt();
			update(root,i-l,i-1);
		}
		System.out.println(root.count);
	}
	static class Node{
		int count;
		int from,to;
		Node left,right;
	}
	static int nextInt()throws IOException{
		InputStream in=System.in;
        int ans=0;
        boolean flag=true;
        byte b=0;
        while ((b>47 && b<58) || flag){
            if(b>=48 && b<58){
                ans=ans*10+(b-48);
                flag=false;
            }
            b=(byte)in.read();
        }
        return ans;
    }
}