Consecutive Girls

No attempts yetTime limit1sMemory limit128 MB

Problem

Boys and girls are standing in a single row, each person right next to the next. When a boy leaves the row, the two people who were on either side of him become neighbors.

We want kk girls to stand consecutively, side by side, with no boy standing among them. Find the minimum number of boys that must leave the row to make this possible.

Input

The first line contains two integers nn and kk (1kn1061 \le k \le n \le 10^6): the number of people standing in the row and the number of girls we want to stand consecutively.

The second line contains nn integers, each 00 or 11, separated by spaces, describing the people in order along the row: 00 is a girl and 11 is a boy.

Output

Print a single integer: the minimum number of boys that must leave the row. If it is impossible to make kk girls stand consecutively, print the word NIE instead.