n=int(input())
s=input()
ndot=0
nx=0
mx=10000000
for i in range(n+1):
    if i==0:
        ndot=sum([1 for i in s if i=="."])
        nx=0
    else:
        if s[i-1]==".":
            ndot-=1
        elif s[i-1]=="#":
            nx+=1