ll n,k,t,z;char s[51];{rd(n,k,s); rep(i,k){ t?--t:++z; t+=s[i%n]-48; } wt(z);}