#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, d, i = 0, cnt, prev = 0, flag = 0, jump = 0;
  string s;
  cin >> n >> d;
  cin >> s;
  while (i <= n - 1) {
    cnt = 0;
    flag = 0;
    i = prev + 1;
    while (cnt < d && i <= n - 1) {
      if (s[i] == '1') prev = i, flag = 1;
      cnt++;
      i++;
    }
    if (!flag) {
      cout << "-1";
      exit(0);
    }
    jump++;
  }
  cout << jump;
  return 0;
}
