stone=input()
color=input()
a=int(stone)
counter=0
xxx=[]
x=9
list=[]
for i in range(a):
    list.append(color[i])
for i in range(a):
    if list[i]=='#':
        xxx.append(i)
for k in range(a):
    if list[k]=='.' and k > min(xxx):
        counter = 1+ counter
print(counter)