#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, d, ctr = 0;
  bool f = true;
  string s;
  cin >> n >> d >> s;
  for (int i = 0; i < n - 1;) {
    f = false;
    for (int j = i + d; j > i; j--) {
      if (j >= n) {
        cout << ctr + 1;
        return 0;
      }
      if (s[j] == '1') {
        i = j;
        ctr++;
        f = true;
      }
    }
    if (!f) {
      cout << "-1";
      return 0;
    }
  }
  cout << ctr;
  return 0;
}
