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

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