#include <bits/stdc++.h>
using namespace std;
int n, d;
string flower;
int nowPos = 1;
int cnt = 0;
int main() {
  cin >> n >> d;
  cin >> flower;
  while (nowPos != n) {
    bool isMove = false;
    for (int i = nowPos + d; i >= nowPos + 1; i--) {
      if (i > flower.size()) continue;
      if (flower[i - 1] == '1') {
        isMove = true;
        nowPos = i;
        cnt += 1;
        break;
      }
    }
    if (isMove == false) {
      cout << "-1";
      return 0;
    }
  }
  cout << cnt;
}
