import copy

n=int(input())
stemp=input()
s=[ i for i in stemp]
s.append("NG")

ans=0
f=0
for i in range(n):
    if f:
        if s[i]==".":
            ans+=1

    elif s[i]=="#":
        f=1


print(ans)