#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int len, max;
  cin >> len >> max;
  string str = "";
  cin >> str;
  bool reach = 1;
  int i = 0, k = 0, jumps = 0;
  while ((i + max) < len) {
    if (reach == 0) break;
    int k = i + max;
    while (k > i) {
      if (str[k] == '1') break;
      k--;
    }
    if (k == i)
      reach = 0;
    else {
      jumps++;
      i = k;
    }
  }
  if (reach == 0)
    cout << "-1\n";
  else if (i == len - 1)
    cout << jumps << endl;
  else
    cout << jumps + 1 << endl;
  return 0;
}
