#include using namespace std; typedef long long ll; int main() { int n,k;string s; cin>>n>>k>>s; int buy=0,stock=0; for (int i=0;i0) stock--; else buy++; k--; if (k==0) { cout<0) stock--; else buy++; stock+=s[i]-'0'; } cout<