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