#include #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using lint=long long; int main(){ int n,k; string s; cin>>n>>k>>s; vector sum(n+1); rep(i,n) sum[i+1]=sum[i]+(s[i]-'0'); lint lo=0,hi=k; while(hi-lo>1){ lint mi=(lo+hi)/2; lint cnt=0,x=mi; while(x>0 && cnt=k) hi=mi; else lo=mi; } printf("%lld\n",hi); return 0; }