#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, t, i, j, k, a, b, c, cs = 1;
  cin >> n >> k;
  vector<long long> val;
  string str;
  cin >> str;
  for (i = 0; i < n; i++)
    if (str[i] == '1') val.push_back(i);
  long long x = 0, cnt = 0;
  j = 0;
  while (x < n - 1) {
    j = x;
    for (i = x; i < n; i++)
      if (str[i] == '1' and x + k >= i) j = i;
    if (j == x) {
      cout << -1;
      return 0;
    }
    cnt++;
    x = j;
  }
  cout << cnt;
  return 0;
}
