import sys input = sys.stdin.readline N, K = map(int, input().split()) S = 'o' + input().rstrip() + 'x' win = [False] * (N + 1) cnt = 0 for i in range(1, N)[::-1]: if S[i] == 'o' and not win[i + 1]: cnt += 1 if i + K + 1 <= N and S[i + K] == 'o' and not win[i + K + 1]: cnt -= 1 if cnt: win[i] = True for i in range(1, K + 1): if not win[i + 1]: print(i) exit() print(0)