n=int(input())
s=input()
res=0
i=0
while(iif s[i]=='x':
j=i+1
while(jand s[j]=='x'):
j+=1
res+=max(j-i-2,0)
i=j
else:
i+=1
print(res)
# https://www.acwing.com/activity/content/code/content/5532758/
T=int(input())
def update(a,i):
if a[i]=='W':
a[i]='B'
else:
a[i]='W'
def check_(c):
res=[]
s_=s[:]for i in range (n-1):
if s_[i]!=c:
update(s_,i)
update(s_,i+1)
res.append(i)
if s_[-1]!=c: return False
print(len(res))for i in res:
print(i + 1, end=' ')
if len(res):
print()
return True
while(T):
n=int(input())
s=list(input())
if not check_('B') and not check_('W'):
print(-1)
T-=1