N, K = map(int, input().split()) S = [True] + [s == 'o' for s in input()] while not S[-1]: S.pop() N = len(S) lst = [None] * N lst[-1] = False false_ct = 1 for i in range(N - 2, -1, -1): if i + K + 1 < N: false_ct -= not lst[i + K + 1] if not S[i]: lst[i] = True continue lst[i] = bool(false_ct) false_ct += not bool(false_ct) if lst[0]: for i in range(1, K + 1): if not lst[i]: print(i) exit() else: print(0)