#include <bits/stdc++.h>
using namespace std;
int dp[101][101];
char s[510][510];
int a[1001] = {0};
int b[1001] = {0};
int visited[1001];
int dfs(int index, int node) {
  if (visited[index] == 1) {
    return index;
  }
  visited[index] = 1;
  return dfs(node, a[node]);
}
int solve() {
  int n, d, j;
  cin >> n >> d;
  string s;
  cin >> s;
  int now = 0, count = 0;
  while (now != n - 1) {
    for (j = d; j; j--) {
      if (s[now + j] == '1') {
        now = now + j;
        count++;
        break;
      }
    }
    if (!j) {
      return -1;
    }
  }
  return count;
}
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  int ans = solve();
  cout << ans << endl;
}
