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.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;


public class C446_D2_Wrath {
  public static void main(String []args) throws IOException {
    new Solution().solve();
  }
}

class Solution {
  FastReader fr = new FastReader();
  BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

  public void solve() throws IOException {
    int count = fr.nextInt();
    int []claw = new int[count];
    for (int i = 0; i < count; i++) {
      claw[i] = i - fr.nextInt();
    }

    int ind = Integer.MAX_VALUE;
    int res = 0;
    for (int i = count-1; i >= 0 ; i--) {
      if (i < ind) {
        res++;
      }
      if (claw[i] < ind) {
        ind = claw[i];
      }
    }

    System.out.print(res);
  }
}

class FastReader {
  private InputStream is;
  private int bufferSize = 1 << 17;
  private byte []buffer = new byte[bufferSize];
  private int currentIndex = 0;
  private int lastIndex = 0;

  public FastReader() {
    is = new BufferedInputStream(System.in);
//		try {
//			is = new BufferedInputStream(new FileInputStream(new File("test.txt")));
//		} catch (FileNotFoundException e) {
//			e.printStackTrace();
//		}
  }

  public int nextInt() {
    int result = 0;
    int minus = 1;

    byte character = readNext();

    while (character == ' ' || character == '\n' || character == '\r') {
      character = readNext();
    }

    if (character == '-') {
      minus = -1;
      character = readNext();
    }

    while (character != ' ' && character != '\n' && character != '\r' && character != -1) {
      result = result * 10 + (character - '0');
      character = readNext();
    }

    return minus*result;
  }

  public long nextLong() {
    long result = 0;
    int minus = 1;

    byte character = readNext();

    while (character == ' ' || character == '\n' || character == '\r') {
      character = readNext();
    }

    if (character == '-') {
      minus = -1;
      character = readNext();
    }

    while (character != ' ' && character != '\n' && character != '\r' && character != -1) {
      result = result * 10 + (character - '0');
      character = readNext();
    }

    return minus*result;
  }

  public String nextString() {
    StringBuffer result = new StringBuffer();

    byte character = readNext();

    while (character == ' ' || character == '\n' || character == '\r') {
      character = readNext();
    }

    while (character != ' ' && character != '\n' && character != '\r' && character != -1) {
      result.append((char)character);
      character = readNext();
    }

    return result.toString();
  }

  public String nextLine() {
    StringBuffer result = new StringBuffer();

    byte character = readNext();

    while (character == '\n' || character == '\r') {
      character = readNext();
    }

    while (character != '\n' && character != '\r' && character != -1) {
      result.append((char)character);
      character = readNext();
    }

    return result.toString();
  }

  private byte readNext() {
    if (currentIndex == lastIndex) {
      try {
        lastIndex = is.read(buffer, 0, bufferSize);
      } catch (IOException e) {
        throw new RuntimeException("What?");
      }
      if (lastIndex == -1) {
        buffer[0] = -1;
      }
      currentIndex = 0;
    }

    return buffer[currentIndex++];
  }
}