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.util.*;
import java.io.*;
public class Wrath {
    
    
    
    /************************ SOLUTION STARTS HERE ************************/
    
    
    private static void solve() {
        
        
        int n = nextInt();
        int arr[] = nextIntArray(n);
        int cuts[] = new int[n];
        
        for(int i = 1; i < n; i++)
            if(arr[i] > 0) {
                cuts[i]--;
                cuts[Math.max(0 , i - arr[i])]++;
            }
        
        for(int i = 1; i < n; i++)
            cuts[i] += cuts[i - 1];
        
        println(Arrays.stream(cuts).filter(val -> val == 0).count());
    }
    
    static void solve2() {
        int n = nextInt();
        int arr[] = nextIntArray(n);
        ArrayList<int[]> seg = new ArrayList<>();
        for(int i = 1; i < n; i++)
            if(arr[i] > 0) 
                seg.add(new int[]{Math.max(0 , i - arr[i]) , i - 1});
        
        Collections.sort(seg , (p1 , p2) -> p1[0] != p2[0] ? p1[0] - p2[0] : p2[0] - p2[1]);
        int curr = -1;
        int dead = 0;
        for(int pair[] : seg)
            if(pair[1] > curr) {
                dead += pair[1] - Math.max(pair[0] , curr + 1) + 1;
                curr = Math.max(curr , pair[1]);
            }
        
        println(n - dead);
    }
    
    /************************ SOLUTION ENDS HERE ************************/
    
    
    
    
    
    /************************ TEMPLATE STARTS HERE **********************/
    
    public static void main(String[] args) throws IOException {
        reader = new BufferedReader(new InputStreamReader(System.in));
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false);
        st     = null;
        solve2();
        reader.close();
        writer.close();
    }
    
    static BufferedReader reader;
    static PrintWriter    writer;
    static StringTokenizer st;
    
    static String next()
    {while(st == null || !st.hasMoreTokens()){try{String line = reader.readLine();if(line == null){return null;}            
    st = new StringTokenizer(line);}catch (Exception e){throw new RuntimeException();}}return st.nextToken();}
    static String nextLine()  {String s=null;try{s=reader.readLine();}catch(IOException e){e.printStackTrace();}return s;}             
    static int    nextInt()   {return Integer.parseInt(next());}
    static long   nextLong()  {return Long.parseLong(next());}     
    static double nextDouble(){return Double.parseDouble(next());}
    static char   nextChar()  {return next().charAt(0);}
    static int[]  nextIntArray(int n)         {int[] a= new int[n];   int i=0;while(i<n){a[i++]=nextInt();}  return a;}
    static long[] nextLongArray(int n)        {long[]a= new long[n];  int i=0;while(i<n){a[i++]=nextLong();} return a;}    
    static int[]  nextIntArrayOneBased(int n) {int[] a= new int[n+1]; int i=1;while(i<=n){a[i++]=nextInt();} return a;}            
    static long[] nextLongArrayOneBased(int n){long[]a= new long[n+1];int i=1;while(i<=n){a[i++]=nextLong();}return a;}            
    static void   print(Object o)  { writer.print(o);  }
    static void   println(Object o){ writer.println(o);}
    
    /************************ TEMPLATE ENDS HERE ************************/
    
}