N= int(input())
moji = list(input())

counter=0
flag=0
for i in range(N):
    if flag ==0:
        if moji[i]=="#":
            flag=1
    elif flag==1:
        if moji[i]==".":
            counter+=1
print(counter)
