n,k=map(int,input().split()) L=[int(i) for i in list(input())] def t(x): a=b=0 for i in range(x): if a>0:a-=1 else:b+=1 a+=L[i%n] return(b,a) if k