#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<map>
#define PI acos(-1.0)
#define in freopen("in.txt", "r", stdin)
#define out freopen("out.txt", "w", stdout)
#define kuaidian ios::sync_with_stdio(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn = 105 + 777, maxd = 1e8;
const ll mod = 1e9 + 7;
const int INF = 0x7f7f7f7f;
int n, m;
char s[maxn];
int main() {
scanf("%d%d", &n, &m);
scanf("%s", s+1);
if(s[1] == '0') return puts("-1")*0;
int pos = 1, ans = 0;
for(int i = 1; i < n; ) {
int id = -1;
for(int j = 1; j <= m && i+j <= n; ++j) {
if(s[i+j] == '1') id = i+j;
}
if(id == -1) return puts("-1")*0;
ans++;
i = id;
}
printf("%d", ans);
return 0;
}