#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  cin >> n;
  cin >> d;
  string a;
  cin >> a;
  int curr = 0;
  int flag = 1;
  int jumps = 0;
  int i;
  for (; true;) {
    if (flag == 1) {
      i = curr + d;
      if (i > n - 1) i = n - 1;
      flag = 0;
    }
    if (i == curr) {
      jumps = -1;
      break;
    }
    char c = a.at(i);
    if (c == '1') {
      curr = i;
      jumps++;
      flag = 1;
      if (curr == n - 1) break;
    } else {
      i--;
    }
  }
  cout << jumps << endl;
  return 0;
}
