n=int(input())
s=input()
answer1=0
flag=True
for i in range(len(s)):
    if s[i]=="#":
        flag=False
    if s[i]=="." and   flag:
        continue
    if s[i]=="." and  not flag:
        answer1+=1
    if s[i]=="#" and  not flag:
        continue

print(answer1)
        