Polycarp and his friends want to visit a new restaurant. The restaurant has $n$ tables arranged along a straight line. People are already sitting at some tables. The tables are numbered from $1$ to $n$ in the order from left to right. The state of the restaurant is described by a string of length $n$ which contains characters "1" (the table is occupied) and "0" (the table is empty).

Restaurant rules prohibit people to sit at a distance of $k$ or less from each other. That is, if a person sits at the table number $i$, then all tables with numbers from $i-k$ to $i+k$ (except for the $i$-th) should be free. In other words, the absolute difference of the numbers of any two occupied tables must be strictly greater than $k$.

For example, if $n=8$ and $k=2$, then:  strings "10010001", "10000010", "00000000", "00100000" satisfy the rules of the restaurant;  strings "10100100", "10011001", "11111111" do not satisfy to the rules of the restaurant, since each of them has a pair of "1" with a distance less than or equal to $k=2$. 

In particular, if the state of the restaurant is described by a string without "1" or a string with one "1", then the requirement of the restaurant is satisfied.

You are given a binary string $s$ that describes the current state of the restaurant. It is guaranteed that the rules of the restaurant are satisfied for the string $s$.

Find the maximum number of free tables that you can occupy so as not to violate the rules of the restaurant. Formally, what is the maximum number of "0" that can be replaced by "1" such that the requirement will still be satisfied?

For example, if $n=6$, $k=1$, $s=$ "100010", then the answer to the problem will be $1$, since only the table at position $3$ can be occupied such that the rules are still satisfied.


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 10^4$) — the number of test cases in the test. Then $t$ test cases follow.

Each test case starts with a line containing two integers $n$ and $k$ ($1 \le k \le n \le 2\cdot 10^5$) — the number of tables in the restaurant and the minimum allowed distance between two people.

The second line of each test case contains a binary string $s$ of length $n$ consisting of "0" and "1" — a description of the free and occupied tables in the restaurant. The given string satisfy to the rules of the restaurant — the difference between indices of any two "1" is more than $k$.

The sum of $n$ for all test cases in one test does not exceed $2\cdot 10^5$.


-----Output-----

For each test case output one integer — the number of tables that you can occupy so as not to violate the rules of the restaurant. If additional tables cannot be taken, then, obviously, you need to output $0$.


-----Example-----
Input
6
6 1
100010
6 2
000000
5 1
10101
3 1
001
2 2
00
1 1
0

Output
1
2
0
1
1
1



-----Note-----

The first test case is explained in the statement.

In the second test case, the answer is $2$, since you can choose the first and the sixth table.

In the third test case, you cannot take any free table without violating the rules of the restaurant.
[{"code": "import sys\nINF = 10**20\nMOD = 10**9 + 7\nI = lambda:list(map(int,input().split()))\nfrom math import gcd\nfrom math import ceil\nfrom collections import defaultdict as dd, Counter\nfrom bisect import bisect_left as bl, bisect_right as br\n\ndef solve():\n  n, k = I()\n  s = input()\n  ans = 0\n  last = -INF\n  for i in range(n):\n    if s[i] == '1':\n      if i - last <= k:\n        ans -= 1\n      last = i\n      count = 0\n      continue\n    if i - last > k:\n      ans += 1\n      last = i \n\n  print(ans)\n\nt, = I()\nwhile t:\n  t -= 1\n  solve()", "passed": true, "time": 0.14, "memory": 14364.0, "status": "done"}, {"code": "T = int(input())\nfor t in range(T):\n    n, k = list(map(int, input().split()))\n    tables = input()\n\n    next_ones = [-1 for i in range(n)]\n    last_one = -1\n    for i in range(n - 1, -1, -1):\n        # print(i)\n        if tables[i] == \"1\":\n            next_ones[i] = i\n            last_one = i\n        else:\n            next_ones[i] = last_one\n\n    prev_one = -1\n    res = 0\n    for i in range(n):\n        if tables[i] == \"1\":\n            prev_one = i\n        else:\n            if prev_one == -1 or i - prev_one > k:\n                if next_ones[i] == -1 or next_ones[i] - i > k:\n                    res += 1\n                    prev_one = i\n\n    print(res)\n", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n, k = list(map(int, input().split()))\n    s = list(map(int,list(input())))\n    ans = 0\n    last1 = n*2\n    for i in range(n):\n        if s[i] == 1:\n            last1 = i\n        elif abs(last1 - i) <= k:\n            s[i] = 1\n    last1 = n*2\n    for i in range(n-1,-1,-1):\n        if s[i] == 1:\n            last1 = i\n        elif abs(last1 - i) <= k:\n            s[i] = 1\n    i = 0\n    while i < n:\n        if s[i] == 0:\n            ans += 1\n            i += k+1\n        else:\n            i += 1\n    print(ans)\n", "passed": true, "time": 0.24, "memory": 14376.0, "status": "done"}, {"code": "from collections import defaultdict as dd\nfrom collections import deque\nimport bisect\nimport heapq\n\ndef ri():\n    return int(input())\n\ndef rl():\n    return list(map(int, input().split()))\n\n\ndef solve():\n    n, k = rl()\n    s = input()\n    blocks = [len(b) for b in s.split('1')]\n    if len(blocks) == 1:\n        print((blocks[0] + k) // (k + 1))\n        return\n    else:\n        total = blocks[0] // (k + 1) + blocks[-1] // (k + 1)\n        for b in blocks[1:-1]:\n            total += max(0, (b - k) // (k + 1))\n\n    print (total)\n    # print (blocks)\n\n\n\n\n\nmode = 'T'\n\nif mode == 'T':\n    t = ri()\n    for i in range(t):\n        solve()\nelse:\n    solve()\n", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "def solve(n, k, s):\n    nextone = [-1]*n\n    last = float('inf')\n    for i in range(n-1, -1, -1):\n        if s[i] == '1':\n            last = i\n        nextone[i] = last\n    prev = float('-inf')\n    sol = 0\n    for i in range(n):\n        if s[i] == '1':\n            prev = i\n        else:\n            if i-prev > k and nextone[i]-i > k:\n                sol += 1\n                prev = i\n    return sol\n\nt = int(input())\nfor _ in range(t):\n    n, k = map(int, input().split())\n    s = input()\n    print(solve(n, k, s))", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "\ntt = int(input())\n\nfor loop in range(tt):\n\n    n,k = map(int,input().split())\n    s = input()\n\n    lis = [0] * n\n    tmp = [0] * n\n    now = 0\n\n    for i in range(n):\n\n        if s[i] == \"1\":\n            now += 1\n\n            if i+k < n:\n                tmp[i+k] += 1\n\n        lis[i] += now\n\n        now -= tmp[i]\n\n    tmp = [0] * n\n    now = 0\n\n    for i in range(n-1,-1,-1):\n\n        if s[i] == \"1\":\n            now += 1\n\n            if i-k >= 0:\n                tmp[i-k] += 1\n\n        lis[i] += now\n        now -= tmp[i]\n\n    tmp = -1\n    ans = 0\n    for i in range(n):\n\n        if tmp < 0 and lis[i] == 0:\n            ans += 1\n            tmp = k\n\n        tmp -= 1\n\n    print (ans)", "passed": true, "time": 0.14, "memory": 14352.0, "status": "done"}, {"code": "import math\nfor nt in range(int(input())):\n\tn,k = map(int,input().split())\n\ts = input()\n\tind = []\n\tfor i in range(n):\n\t\tif s[i]==\"1\":\n\t\t\tind.append(i)\n\tif len(ind)==0:\n\t\tprint (math.ceil(n/(k+1)))\n\t\tcontinue\n\tcount = ind[0]//(k+1)\n\tfor i in range(1,len(ind)):\n\t\tcount += max(0,math.ceil((ind[i]-ind[i-1]-2*k-1)/(k+1)))\n\tcount += (n-ind[-1]-1)//(k+1)\n\tprint (count)", "passed": true, "time": 0.24, "memory": 14064.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor tests in range(t):\n    n,k=list(map(int,input().split()))\n    S=input().strip()\n    \n    A=[]\n\n    X=0\n    for s in S:\n        if s==\"0\":\n            X+=1\n        else:\n            A.append(X)\n            X=0\n    if X!=0:\n        A.append(X)\n\n    if len(A)==1 and A[0]==n:\n        print(1+(n-1)//(k+1))\n        continue\n\n    ANS=0\n    if S[0]==\"0\" and S[-1]==\"0\":\n        ANS+=A[0]//(k+1)+A[-1]//(k+1)\n\n        for i in range(1,len(A)-1):\n            ANS+=(A[i]-k)//(k+1)\n\n    elif S[0]==\"0\":\n        ANS+=A[0]//(k+1)\n\n        for i in range(1,len(A)):\n            ANS+=max(0,A[i]-k)//(k+1)\n\n    elif S[-1]==\"0\":\n        ANS+=A[-1]//(k+1)\n\n        for i in range(len(A)-1):\n            ANS+=max(0,A[i]-k)//(k+1)\n\n    else:\n        for i in range(len(A)):\n            ANS+=max(0,A[i]-k)//(k+1)\n\n    print(ANS)\n        \n        \n        \n        \n    \n\n    \n", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "#A,B,C,D = map(int,input().split())\nt = int(input())\nfor i in range(t):\n    a,b = list(map(int,input().split()))\n    D = list(input())\n    \n    sep = []\n    c = b\n    \n    for j in range(a):\n        if D[j] == '1':\n            sep.append(max(0, c-b))\n            c = 0\n        else:\n            c+=1\n            \n    sep.append(max(0, c))\n    #print(sep)\n     \n    tot = 0\n    for j in sep:\n        tot += j//(b+1)\n        \n    print(tot)", "passed": true, "time": 0.22, "memory": 14136.0, "status": "done"}, {"code": "t = int(input())\n\nfor _ in range(t):\n    n, k = list(map(int, input().split()))\n    s = input()\n    prev = 0\n    c = 0\n    if s[0] == \"0\":\n        c += 1\n    for i, x in enumerate(s):\n        if i == 0:\n            continue\n        if x == \"1\":\n            if i - prev <= k:\n                c -= 1\n            prev = i\n        else:\n            if i - prev > k:\n                c += 1\n                prev = i\n    print(c)\n", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "for t in range(int(input())):\n    n,k = map(int,input().split())\n    s = list(input())\n\n    mk = 0\n    for i in range(n):\n        if s[i]=='1':\n            for j in range(max(mk,i-k),min(i+k+1,n)):\n                s[j] = 'X'\n            mk = j\n\n    ans = 0\n    newBoundary = -1\n    for i in range(n):\n        if i > newBoundary and s[i]=='0':\n            ans += 1\n            newBoundary = i+k\n    print(ans)", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "from sys import stdin, stdout, setrecursionlimit\nfor _ in range(int(input())):\n    n, k = list(map(int, input().split()))\n    s = input()\n    s = '1' + '0' * k + s + '0' * k + '1'\n    cou = 0\n    a = []\n    for i in range(len(s)):\n        if s[i] == '1':\n            a.append(i)\n    # print(a)\n    for i in range(1, len(a)):\n        cou += (a[i] - a[i - 1] - 1 - k) // (k + 1)\n    print(cou)\n", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}]