#include <bits/stdc++.h>
using namespace std;
int main() {
  long long b, c, e = 0, f = 0, g, h;
  string a;
  cin >> b >> c >> a;
  while (f < b) {
    e = e + 1;
    g = f + c;
    if (g >= b - 1) {
      break;
    }
    while (a[g] == '0') {
      g = g - 1;
    }
    if (f == g) {
      cout << "-1";
      return 0;
    }
    f = g;
  }
  cout << e;
}
