#include <bits/stdc++.h>
void codeforces_tr14_A() {
  int n;
  int d;
  scanf("%d %d", &n, &d);
  char a[n + d];
  scanf("%s", a);
  for (int i = n; i < n + d; i++) {
    a[i] = '0';
  }
  int t = 1;
  int result = 0;
  while (t < n) {
    int s = t + d;
    while (a[s - 1] == '0' && s != t) {
      s--;
    }
    if (s == t && t != n) {
      printf("-1");
      return;
    } else {
      t = s;
      result++;
    }
  }
  printf("%d", result);
}
void codeforces_tr14_B() {}
void codeforces_tr14_C() {}
void codeforces_tr14_D() {}
void codeforces_tr14_E() {}
int main(void) {
  codeforces_tr14_A();
  return 0;
}
