a=input()
b=input()
scount=0
ccount=0

for i in b:
        if scount==0 and i ==".":
                pass
        elif i =="#":
                scount+=1
        elif i == ".":
                ccount+=1
print(ccount)
