n=int(input()) L=list(map(int,input().split())) ans=0 for i in range(1,n): if L[i-1]=="x" and L[i]=="o": ans+=1 print(ans)