#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0, n, d, x = 0;
  cin >> n >> d;
  string s;
  cin >> s;
  while (x != n - 1) {
    int y = d;
  f:
    if (s[x + y] == 49) {
      ans++;
      x += y;
    } else {
      y--;
      if (y == 0) {
        ans = -1;
        break;
      } else
        goto f;
    }
  }
  cout << ans;
}
