n,k = map(int,input().split()) s = "o"+input() dp = [0]*n v = n for i in range(n-1,-1,-1): if i < v and s[i]=="o": dp[i] = 1 v = i-k print(v+k)