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