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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Scanner;


public class lazyPropagation  {

    
    
    public static void main(String[] args) throws IOException, ParseException{
        Kattio sc = new Kattio(System.in,System.out);
        //Scanner sc = new Scanner(new FileInputStream("kingdom.in"));
        int n = sc.nextInt();
        int[] a = new int[n];
        BIT = new int[n+1];
        for(int i=0 ; i<n ; i++){
            a[i] = sc.nextInt();
            int s = i-a[i];
            if(s<0){
                s = 0;
            }
            update(s+1,i,n,1);
        }
        int c = 0;
        for(int i=1 ; i<=n ; i++){
            if(getSum(i)==0){
                c++;
            }
        }
        System.out.println(c);
        sc.flush();
    }  
    
    
    static int[] BIT;
    static void update(int l, int r, int n, int val){
        add(n, l, val);
        add(n, r+1, -val);
    }
    
    
    static void add(int n, int x, int delta){ 
        for(; x <= n; x += x&-x){
            BIT[x] += delta; 
        } 
    }
    
    
    static int getSum(int index){
        int sum = 0; 
        while (index>0){
            sum += BIT[index];
            index -= index & (-index);
        }
        return sum;
    }
    
    
    static class couple{
        int b;
        int w;
        couple(int b, int w){
            this.b=b;
            this.w=w;
        }
    }
    
    
    static class Kattio extends PrintWriter {
        public Kattio(InputStream i) {
            super(new BufferedOutputStream(System.out));
            r = new BufferedReader(new InputStreamReader(i));
        }
        public Kattio(InputStream i, OutputStream o) {
            super(new BufferedOutputStream(o));
            r = new BufferedReader(new InputStreamReader(i));
        }
        
        public Kattio(FileInputStream i) {
            super(new BufferedOutputStream(System.out));
            r = new BufferedReader(new InputStreamReader(i));
        }
        public Kattio(FileInputStream i, OutputStream o) {
            super(new BufferedOutputStream(o));
            r = new BufferedReader(new InputStreamReader(i));
        }
    public boolean hasMoreTokens() {
        return peekToken() != null;
    }

    public int nextInt() {
        return Integer.parseInt(nextToken());
    }

    public double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    public long nextLong() {
        return Long.parseLong(nextToken());
    }

    public String next() {
        return nextToken();
    }



    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) { }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}
    
}