#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n, d;
  string s;
  cin >> n >> d >> s;
  int temp = 0;
  int flag = 0;
  int count = 0;
  for (int i = 0; i < n;) {
    flag = 0;
    if (i == n - 1) {
      break;
    }
    for (int j = i + 1; j < min(i + d + 1, n); j = j + 1) {
      if (s[j] == '1') {
        flag = 1;
        temp = j;
      }
    }
    if (flag == 0) {
      cout << -1;
      return 0;
    } else {
      i = temp;
      count += 1;
    }
  }
  cout << count;
  return 0;
}
