#include <bits/stdc++.h>
using namespace std;
int N[105];
int n, d, total, current = 1, currentprime;
int parcurgere() {
  if (current + d >= n) {
    return ++total;
  }
  for (int j = 1; j <= n; j++) {
    currentprime = current;
    for (int i = 1 + currentprime; i < d + currentprime + 1; i++) {
      if (N[i] == 1) {
        current = i;
      }
    }
    total++;
    if (current + d >= n) {
      return ++total;
      break;
    }
    if (current == currentprime) {
      return -1;
      break;
    }
  }
}
int main() {
  string s;
  cin >> n >> d >> s;
  for (int i = 1; i <= n; i++) {
    N[i] = s[i - 1] - '0';
  }
  cout << parcurgere();
}
