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 {
    DeluxeScanner in = new DeluxeScanner(null);
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out), true);
    int n;
    int[] a;
    boolean[] u;
    long res;


    void run() {
        n = in.nextInt();
        res = n;
        a = new int[n];
        u = new boolean[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }


        long res = n;
        for (int i = n - 1; i >= 0;) {
            if (a[i] > 0) {
                int diff  = (i - a[i] > 0) ? a[i] : i;
                int lastPos = 0;
                for (int j = i - 1; diff != 0 && j >= 0; j--) {
                    if (!u[j]) {
                        u[j] = true;
                        res--;
                        diff--;
                        if (a[j] > 0) {
                            diff = Math.max(diff, a[j]);
                        }
                    }
                    lastPos = j;
                }
                i = lastPos;
            }
            i--;
        }
        out.print(res);
        out.close();
    }

    public static void main(String[] args) {
        new B().run();
    }

    static class DeluxeScanner {
        BufferedReader br;
        StringTokenizer st;

        DeluxeScanner(String filename) {
            if (filename != null)
                try {
                    br = new BufferedReader(new FileReader(filename));
                }
                catch (FileNotFoundException e) {
                    e.printStackTrace();
                }
            else
                br = new BufferedReader(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();
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        char[] nextCharArray(int n) {
            char[] g = new char[n];
            g = next().toCharArray();
            return g;
        }

        char[][] nextChar2DArray(int n, int m) {
            char[][] g = new char[n][m];
            for (int i = 0; i < n; i++)
                g[i] = nextCharArray(m);
            return g;
        }

        double[] nextDoubleArray(int n) {
            double[] a = new double[n];
            for (int i = 0; i < n; i++)
                a[i] = nextDouble();
            return a;
        }

        double[][] nextDouble2DArray(int n, int m) {
            double[][] a = new double[n][m];
            for (int i = 0; i < n; i++)
                a[i] = nextDoubleArray(m);
            return a;
        }

        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        int[][] nextInt2DArray(int n, int m) {
            int[][] a = new int[n][m];
            for (int i = 0; i < n; i++)
                a[i] = nextIntArray(m);
            return a;
        }

        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        long[][] nextLong2DArray(int n, int m) {
            long[][] a = new long[n][m];
            for (int i = 0; i < n; i++)
                a[i] = nextLongArray(m);
            return a;
        }
    }

    static class Pair<K extends Comparable<K>, V extends Comparable<V>> implements Comparable<Pair<K, V>> {
        K first;
        V second;

        public Pair(K first, V second) {
            this.first = first;
            this.second = second;
        }

        K getLeft() {
            return this.first;
        }

        void setLeft(K first) {
            this.first = first;
        }

        V getRight() {
            return this.second;
        }

        void setRight(V right) {
            this.second = right;
        }

        @Override
        public int compareTo(Pair<K, V> pair) {
            if (this.getLeft().compareTo(pair.getLeft()) != 0)
                return this.getLeft().compareTo(pair.getLeft());
            else
                return this.getRight().compareTo(pair.getRight());
        }

        @Override
        public boolean equals(Object obj) {
            if(obj == this) {
                return true;
            } else if(!(obj instanceof Pair)) {
                return false;
            } else {
                Pair<?, ?> other = (Pair)obj;
                return Objects.equals(this.getLeft(), other.getLeft()) && Objects.equals(this.getRight(), other.getRight());
            }
        }

        @Override
        public int hashCode() {
            return (this.getLeft() == null?0:this.getLeft().hashCode()) ^ (this.getRight() == null?0:this.getRight().hashCode());
        }

        @Override
        public String toString() {
            return "" + '(' + this.getLeft() + ',' + this.getRight() + ')';
        }

        public String toString(String format) {
            return String.format(format, new Object[]{this.getLeft(), this.getRight()});
        }
    }
}
