#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  string s;
  cin >> n >> d >> s;
  int i = 0, cnt = 0;
  while (i < s.length() - 1) {
    if (s.length() - 1 - i <= d) {
      cnt++;
      break;
    }
    int tmp = i;
    for (int j = d; j > 0; --j) {
      if (s[i + j] == '1') {
        cnt++;
        i += j;
        break;
      }
    }
    if (tmp == i) {
      cout << "-1" << endl;
      return 0;
    }
  }
  cout << cnt << endl;
  return 0;
}
