#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int cont = 0;
  for (int i = 0; i < n;) {
    int j = i + k;
    while (s[j] == '0' && j < n && j > i) {
      j--;
    }
    if (j > n) {
      cout << cont + 1 << endl;
      return 0;
    }
    if (j != i) {
      i = j;
      cont++;
      if (j == n - 1) break;
    } else {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << cont << endl;
}
