There are desks in a room, placed from left to right, one next to each other. Some desks have phones on them, whereas some desks are empty. All phones are broken, so the phone on the desk will ring if the phone at desk rings, which is at most desks away from the desk. In other words, it holds . The first and the last desk will always have a phone on them. In the beginning the leftmost phone rings. What is the minimal amount of new phones to be placed on the desks so that the last phone rings?
Input Specification
The first line of input contains two positive integers, and .
The following line contains numbers or . If the number is , then the desk from the left has a phone on it, otherwise the desk is empty.
Output Specification
The first and only line of output must contain the required minimal number of phones.
Scoring
In test cases worth points in total, it will hold .
Sample Input 1
4 1
1 0 1 1
Sample Output 1
1
Sample Input 2
5 2
1 0 0 0 1
Sample Output 2
1
Sample Input 3
8 2
1 1 0 0 1 0 0 1
Sample Output 3
2
Comments