n=int(input())
s=list(input())
a=0
temp=0
count=0
for i in range(n-1):
  if a==0:
    if s[i]=="#" and s[i+1]==".":
      count=count+1
      a=1
    try:
      temp=s[i+4]
    except:
    else:
      if temp=="#":
        a=0
  else:
    a=0
print(count)