func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long LLINF = 1e18 + 7;   const long long INF = 1e9 + 7;   const long long EPS = 1e-9 - 7;   const long long MAX = 1e2 + 7;   const long long MOD = 1e9 + 7;   int n, d, dp[MAX];   string s;   bool can[MAX], flag = false;   int main() {     memset(dp, MAX, sizeof dp);     cin >> n >> d >> s;     for (int i = 0; i < n; i++) {       if (s[i] ==  1 ) {         can[i + 1] = true;       }     }     for (int i = n - 1; i >= 1; i--) {       if (n - i <= d && can[i]) {         flag = true;         dp[i] = 1;       }     }     if (!flag) {       cout << -1 << endl;       return 0;     }     for (int i = n - 1; i >= 1; i--) {       for (int j = i - 1; j >= 1; j--) {         if (i - j <= d && can[j] && can[i]) {           dp[j] = min(dp[j], dp[i] + 1);         }       }     }     if (dp[1] >= n) {       cout << -1 << endl;       return 0;     }     cout << dp[1] << endl;     return 0;   }   