#include <bits/stdc++.h>
using namespace std;
int Pow(int base, int exp) {
  if (exp == 0)
    return 1;
  else
    return base * Pow(base, exp - 1);
}
int main() {
  int n, d, sum = 0;
  scanf("%d %d", &n, &d);
  string s;
  cin >> s;
  for (int i = 0; i <= s.size() - 1; i++) {
    if (i < s.size() - 1) {
      int p = 0;
      for (int j = i + 1; j <= i + d; j++) {
        if (s[j] == '1') p = j;
      }
      if (p == 0) {
        cout << "-1";
        return 0;
      } else
        sum++, i = p - 1;
    }
  }
  cout << sum;
}
