#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  long long int n, d;
  cin >> n >> d;
  long long int pos = 0;
  string second;
  cin >> second;
  long long int co = 0;
  while (true) {
    long long int idx = 0;
    for (int i = 1; i <= d && i + pos < n; i++) {
      if (second[i + pos] == '1') idx = i;
    }
    if (idx == 0) return cout << -1 << endl, 0;
    pos = pos + idx;
    co++;
    if (pos >= n - 1) break;
  }
  cout << co << endl;
  return 0;
}
