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.*;

public class B
{
    public static void main(String []av) {
        Scanner s = new Scanner();
        int n = s.nextInt();
        List<LI> L = new ArrayList<>();
        LI line = new LI(1, n);
        for (int i = 1; i <= n; i++) {
            long Li = s.nextLong();
            if (Li > 0)
                L.add(new LI(i - Li, i-1).intersection(line));
        }
        long alive = n;
        if (L.size() > 0)
            L = mergeOverlappingIntervals(L);
            for (LI i : L) {
                alive -= i.length() + 1;
            }
        System.out.println(alive);
    }

    static List<LI> mergeOverlappingIntervals(List<LI> ilist) {
        Collections.sort(ilist);

        List<LI> nonOverlap = new ArrayList<>();
        Iterator<LI> left = ilist.iterator();

        // merge all consecutive overlapping intervals
        // and add them to separate list.
        LI b = left.next();
        while (left.hasNext()) {
            LI nextB = left.next();
            if (b.overlaps(nextB)) {
                b = b.union(nextB);
            } else {
                nonOverlap.add(b);
                b = nextB;
            }
        }
        nonOverlap.add(b);
        return nonOverlap;
    }

    /* Support for operations on closed intervals [s, e]
     * long version. */
    static class LI implements Comparable<LI> {
        final long s, e;
        LI(long s, long e) { this.s = s; this.e = e; }
        boolean contains(long v) {
            return this.s <= v && v <= this.e; }
        public boolean overlaps(LI that) {
            return contains(that.s) || contains(that.e)
              || that.contains(this.s) || that.contains(this.e); }
        /* Compute interval that is the union.
         * Does not check if intervals overlap. */
        public LI union(LI that) {
            return new LI(Math.min(this.s, that.s), Math.max(this.e, that.e));
        }
        public LI intersection(LI that) {
            return new LI(Math.max(this.s, that.s), Math.min(this.e, that.e));
        }
        long length() { return this.e - this.s; }
        public String toString() {
            return String.format("(%d, %d)", this.s, this.e); }
        /* Natural order is based on left coordinate */
        public int compareTo(LI that) {
            return Long.compare(this.s, that.s);
        }
    }

    //-----------Scanner class for faster input----------
    /* Provides similar API as java.util.Scanner but does not
     * use regular expression engine.  
     */
    public static class Scanner {
        BufferedReader br;
        StringTokenizer st;

        public Scanner(Reader in) {
            br = new BufferedReader(in);
        }

        public Scanner() { this(new InputStreamReader(System.in)); }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() { return Integer.parseInt(next()); }
        long nextLong() { return Long.parseLong(next()); }
        double nextDouble() { return Double.parseDouble(next()); }

        // Slightly different from java.util.Scanner.nextLine(),
        // which returns any remaining characters in current line,
        // if any.  
        String readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }
        long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextLong();
            }
            return a;
        } 
    }
    //--------------------------------------------------------    
}
