#include <bits/stdc++.h>
using namespace std;
char s[1201];
int wz[101], n, cnt, d, now = 1, k;
int main() {
  cin >> n >> d;
  scanf("%s", s + 1);
  while (now != n) {
    bool pd = {true};
    for (int i = now + d; i > now; i--) {
      if (s[i] == '1') {
        now = i;
        pd = false;
        cnt++;
        break;
      }
    }
    if (pd == true) {
      cout << -1;
      return 0;
    }
  }
  cout << cnt;
  return 0;
}
