#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long len, d;
  cin >> len >> d;
  string s;
  cin >> s;
  long long j = 1;
  long long count = 0;
  long long i = 0;
  long long point = -1;
  while (1) {
    if (i < d && j < len) {
      if (s[j] == '1') point = j;
      i++;
      j++;
    } else if (i == d) {
      if (point == -1) {
        cout << -1 << "\n";
        return 0;
      } else {
        count++;
        j = point + 1;
        point = -1;
        i = 0;
      }
    } else
      break;
  }
  if (point != -1) count++;
  cout << count << "\n";
  return 0;
}
