#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, start, i, cnt = 0;
  string str;
  bool flag = true;
  cin >> n >> d >> str;
  start = 0;
  while (flag) {
    flag = false;
    if (start + d >= n - 1) {
      cout << cnt + 1;
      break;
    } else
      i = start + d;
    while (i > start) {
      if (str[i] == '1') {
        flag = true;
        cnt++;
        break;
      }
      i--;
    }
    if (flag) {
      start = i;
    } else {
      cout << "-1";
      break;
    }
  }
  return 0;
}
